소스 검색

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

susices 2 년 전
부모
커밋
f99c573005
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      Share/Share.SourceGenerator/Generator/ETSystemGenerator/ETSystemGenerator.cs
  2. BIN
      Unity/Assets/Plugins/Share.SourceGenerator.dll

+ 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