summaryrefslogtreecommitdiffstats
path: root/modules/mono
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/csharp_script.cpp4
-rw-r--r--modules/mono/doc_classes/CSharpScript.xml2
-rw-r--r--modules/mono/doc_classes/GodotSharp.xml2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Godot.NET.Sdk.csproj2
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/Godot.SourceGenerators.csproj2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs30
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj2
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharpEditor/GodotSharpEditor.csproj2
8 files changed, 34 insertions, 12 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 872e803b9c..d3c2415755 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -589,7 +589,7 @@ Vector<ScriptLanguage::StackInfo> CSharpLanguage::debug_get_current_stack_info()
_recursion_flag_ = false;
};
- if (!gdmono->is_runtime_initialized()) {
+ if (!gdmono || !gdmono->is_runtime_initialized()) {
return Vector<StackInfo>();
}
@@ -679,6 +679,7 @@ void CSharpLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_soft
#ifdef GD_MONO_HOT_RELOAD
bool CSharpLanguage::is_assembly_reloading_needed() {
+ ERR_FAIL_NULL_V(gdmono, false);
if (!gdmono->is_runtime_initialized()) {
return false;
}
@@ -713,6 +714,7 @@ bool CSharpLanguage::is_assembly_reloading_needed() {
}
void CSharpLanguage::reload_assemblies(bool p_soft_reload) {
+ ERR_FAIL_NULL(gdmono);
if (!gdmono->is_runtime_initialized()) {
return;
}
diff --git a/modules/mono/doc_classes/CSharpScript.xml b/modules/mono/doc_classes/CSharpScript.xml
index f8293fb107..e8da9d8465 100644
--- a/modules/mono/doc_classes/CSharpScript.xml
+++ b/modules/mono/doc_classes/CSharpScript.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSharpScript" inherits="Script" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+<class name="CSharpScript" inherits="Script" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
A script implemented in the C# programming language (Mono-enabled builds only).
</brief_description>
diff --git a/modules/mono/doc_classes/GodotSharp.xml b/modules/mono/doc_classes/GodotSharp.xml
index faf3512da7..76eefc4925 100644
--- a/modules/mono/doc_classes/GodotSharp.xml
+++ b/modules/mono/doc_classes/GodotSharp.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="GodotSharp" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+<class name="GodotSharp" inherits="Object" version="4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
<brief_description>
Bridge between Godot and the Mono runtime (Mono-enabled builds only).
</brief_description>
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Godot.NET.Sdk.csproj b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Godot.NET.Sdk.csproj
index 013b210ff4..e8ad6a77ea 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Godot.NET.Sdk.csproj
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Godot.NET.Sdk.csproj
@@ -7,7 +7,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>Godot.NET.Sdk</PackageId>
- <Version>4.0.0</Version>
+ <Version>4.1.0</Version>
<PackageVersion>$(PackageVersion_Godot_NET_Sdk)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/editor/Godot.NET.Sdk</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/Godot.SourceGenerators.csproj b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/Godot.SourceGenerators.csproj
index f51b5970c3..2557b70e75 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/Godot.SourceGenerators.csproj
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/Godot.SourceGenerators.csproj
@@ -9,7 +9,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>Godot.SourceGenerators</PackageId>
- <Version>4.0.0</Version>
+ <Version>4.1.0</Version>
<PackageVersion>$(PackageVersion_Godot_SourceGenerators)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
index c267d32f5a..f50803af95 100644
--- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
@@ -35,6 +35,7 @@ namespace GodotTools
private PopupMenu _menuPopup;
private AcceptDialog _errorDialog;
+ private ConfirmationDialog _confirmCreateSlnDialog;
private Button _bottomPanelBtn;
private Button _toolBarBuildButton;
@@ -99,7 +100,7 @@ namespace GodotTools
pr.Step("Done".TTR());
// Here, after all calls to progress_task_step
- CallDeferred(nameof(_RemoveCreateSlnMenuOption));
+ CallDeferred(nameof(_ShowDotnetFeatures));
}
else
{
@@ -110,9 +111,8 @@ namespace GodotTools
}
}
- private void _RemoveCreateSlnMenuOption()
+ private void _ShowDotnetFeatures()
{
- _menuPopup.RemoveItem(_menuPopup.GetItemIndex((int)MenuOptions.CreateSln));
_bottomPanelBtn.Show();
_toolBarBuildButton.Show();
}
@@ -122,8 +122,17 @@ namespace GodotTools
switch ((MenuOptions)id)
{
case MenuOptions.CreateSln:
- CreateProjectSolution();
+ {
+ if (File.Exists(GodotSharpDirs.ProjectSlnPath) || File.Exists(GodotSharpDirs.ProjectCsProjPath))
+ {
+ ShowConfirmCreateSlnDialog();
+ }
+ else
+ {
+ CreateProjectSolution();
+ }
break;
+ }
case MenuOptions.SetupGodotNugetFallbackFolder:
{
try
@@ -169,6 +178,13 @@ namespace GodotTools
_errorDialog.PopupCentered();
}
+ public void ShowConfirmCreateSlnDialog()
+ {
+ _confirmCreateSlnDialog.Title = "C# solution already exists. This will override the existing C# project file, any manual changes will be lost.".TTR();
+ _confirmCreateSlnDialog.DialogText = "Create C# solution".TTR();
+ _confirmCreateSlnDialog.PopupCentered();
+ }
+
private static string _vsCodePath = string.Empty;
private static readonly string[] VsCodeNames =
@@ -420,6 +436,10 @@ namespace GodotTools
_errorDialog = new AcceptDialog();
editorBaseControl.AddChild(_errorDialog);
+ _confirmCreateSlnDialog = new ConfirmationDialog();
+ _confirmCreateSlnDialog.Confirmed += () => CreateProjectSolution();
+ editorBaseControl.AddChild(_confirmCreateSlnDialog);
+
MSBuildPanel = new MSBuildPanel();
MSBuildPanel.Ready += () =>
MSBuildPanel.BuildOutputView.BuildStateChanged += BuildStateChanged;
@@ -453,8 +473,8 @@ namespace GodotTools
{
_bottomPanelBtn.Hide();
_toolBarBuildButton.Hide();
- _menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
}
+ _menuPopup.AddItem("Create C# solution".TTR(), (int)MenuOptions.CreateSln);
_menuPopup.IdPressed += _MenuOptionPressed;
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj b/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj
index 7aa2f7e959..7f045e0fab 100644
--- a/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj
+++ b/modules/mono/glue/GodotSharp/GodotSharp/GodotSharp.csproj
@@ -20,7 +20,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>GodotSharp</PackageId>
- <Version>4.0.0</Version>
+ <Version>4.1.0</Version>
<PackageVersion>$(PackageVersion_GodotSharp)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/glue/GodotSharp/GodotSharp</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
diff --git a/modules/mono/glue/GodotSharp/GodotSharpEditor/GodotSharpEditor.csproj b/modules/mono/glue/GodotSharp/GodotSharpEditor/GodotSharpEditor.csproj
index 8f623625fc..cf48ab3afa 100644
--- a/modules/mono/glue/GodotSharp/GodotSharpEditor/GodotSharpEditor.csproj
+++ b/modules/mono/glue/GodotSharp/GodotSharpEditor/GodotSharpEditor.csproj
@@ -15,7 +15,7 @@
<Authors>Godot Engine contributors</Authors>
<PackageId>GodotSharpEditor</PackageId>
- <Version>4.0.0</Version>
+ <Version>4.1.0</Version>
<PackageVersion>$(PackageVersion_GodotSharp)</PackageVersion>
<RepositoryUrl>https://github.com/godotengine/godot/tree/master/modules/mono/glue/GodotSharp/GodotSharpEditor</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>