summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2023-01-18 19:43:53 +0100
committerRaul Santos <raulsntos@gmail.com>2023-01-18 21:53:58 +0100
commit3425d43fed6ef8868ef1f139db4b7e2673a4072f (patch)
tree872876139a1ab3d6a41fcb3ae01b7d9622130c5d /modules/mono
parent62106fe5e3c960056d32a9bc70c0399d99e4cc77 (diff)
C#: Move `GLOBAL_DEF`s to CSharpLanguage ctor
Also documents the .NET project settings.
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/csharp_script.cpp5
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs6
3 files changed, 5 insertions, 8 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index e39127e0a1..7606465b8a 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -113,6 +113,11 @@ void CSharpLanguage::init() {
BindingsGenerator::handle_cmdline_args(cmdline_args);
#endif
+ GLOBAL_DEF("dotnet/project/assembly_name", "");
+#ifdef TOOLS_ENABLED
+ GLOBAL_DEF("dotnet/project/solution_directory", "");
+#endif
+
gdmono = memnew(GDMono);
gdmono->initialize();
diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
index de10c04e31..08147d9f6a 100644
--- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
@@ -411,8 +411,6 @@ namespace GodotTools
_editorSettings = editorInterface.GetEditorSettings();
- GodotSharpDirs.RegisterProjectSettings();
-
_errorDialog = new AcceptDialog();
editorBaseControl.AddChild(_errorDialog);
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
index 4e892be55c..7624989092 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/GodotSharpDirs.cs
@@ -48,12 +48,6 @@ namespace GodotTools.Internals
}
}
- public static void RegisterProjectSettings()
- {
- GlobalDef("dotnet/project/assembly_name", "");
- GlobalDef("dotnet/project/solution_directory", "");
- }
-
public static void DetermineProjectLocation()
{
static string DetermineProjectName()