Explorar el Código

修复system参数为数组或元组时 代码生成报错问题 (#542)

susices hace 2 años
padre
commit
f99c573005

+ 2 - 1
Share/Share.SourceGenerator/Generator/ETSystemGenerator/ETSystemGenerator.cs

@@ -158,7 +158,8 @@ namespace {{namespaceName}}
                 string argsVars = string.Join(", ", argsVarsList);
                 string argsTypes = string.Join(", ", argsTypesList);
                 string argsTypesVars = string.Join(", ", argsTypeVarsList);
-                string argsTypesUnderLine = string.Join("_", argsTypesList).Replace(", ", "_").Replace(".", "_").Replace("<", "_").Replace(">", "_");
+                string argsTypesUnderLine = string.Join("_", argsTypesList).Replace(", ", "_").Replace(".", "_")
+                        .Replace("<", "_").Replace(">", "_").Replace("[]","Array").Replace("(","_").Replace(")","_");
                 string argsTypesWithout0 = string.Join(", ", argsTypesWithout0List);
                 string argsVarsWithout0 = string.Join(", ", argsVarsWithout0List);
                 string argsTypesVarsWithout0 = string.Join(", ", argsTypeVarsWithout0List);

BIN
Unity/Assets/Plugins/Share.SourceGenerator.dll