From 8c118838bf4b9c69422fd79ea287091da15982d6 Mon Sep 17 00:00:00 2001 From: hzhang Date: Mon, 10 Feb 2025 16:03:22 +0000 Subject: [PATCH] fix: change Global class Namespace --- Polonium.Tasks.csproj | 2 +- src/GenerateProxyNodesTask.cs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Polonium.Tasks.csproj b/Polonium.Tasks.csproj index a998d2f..2c8e0bb 100644 --- a/Polonium.Tasks.csproj +++ b/Polonium.Tasks.csproj @@ -8,7 +8,7 @@ Polonium.Tasks Polonium.Tasks true - 0.0.9 + 0.0.91 true true diff --git a/src/GenerateProxyNodesTask.cs b/src/GenerateProxyNodesTask.cs index cf3505f..9e7cd82 100644 --- a/src/GenerateProxyNodesTask.cs +++ b/src/GenerateProxyNodesTask.cs @@ -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());