fix: change Global class Namespace

This commit is contained in:
h z
2025-02-10 16:03:22 +00:00
parent e80a2d9315
commit 8c118838bf
2 changed files with 9 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
<RootNamespace>Polonium.Tasks</RootNamespace>
<AssemblyName>Polonium.Tasks</AssemblyName>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.0.9</Version>
<Version>0.0.91</Version>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateDependencyFile>true</GenerateDependencyFile>
<TargetsForTfmSpecificBuildOutput>

View File

@@ -46,12 +46,14 @@ public class GenerateProxyNodesTask : Task
string className = cls.Identifier.Text;
StringBuilder sb = new StringBuilder();
sb.AppendLine("using Godot;");
sb.AppendLine($"namespace GlobalProxy {{");
sb.AppendLine($" [GlobalClass]");
sb.AppendLine($" [Tool]");
sb.AppendLine($" public partial class {className} : {GetDisplayName(cls)} {{ }}");
sb.AppendLine("}");
sb
.AppendLine("using Godot;")
.AppendLine("namespace GlobalClasses;")
.AppendLine("[GlobalClass]")
.AppendLine("[Tool]")
.AppendLine($"public partial class {className} : {GetDisplayName(cls)}")
.AppendLine("{")
.AppendLine("}");
string outputFile = Path.Combine(OutputDirectory, $"{className}.cs");
File.WriteAllText(outputFile, sb.ToString());