summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-09-20 18:55:13 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-09-20 18:55:13 +0200
commit5fd8506e19ef5cdf82097ef67dfc615a225a7488 (patch)
tree76d36f49ff172c050beca5add600ec4ca8a3366b
parentce0fa4c691638949387d25fc19fcfe10898d218c (diff)
parentc01a47867be006439f31cce09e774c88d895c1f2 (diff)
downloadredot-engine-5fd8506e19ef5cdf82097ef67dfc615a225a7488.tar.gz
Merge pull request #81847 from crazyStewie/dotnet_editor_project_fix
Implemented {project} placeholder for external dotnet editor
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
index 1c1185d91b..e186c0302b 100644
--- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
@@ -190,6 +190,9 @@ namespace GodotTools
case ExternalEditorId.CustomEditor:
{
string file = ProjectSettings.GlobalizePath(script.ResourcePath);
+ string project = ProjectSettings.GlobalizePath("res://");
+ // Since ProjectSettings.GlobalizePath replaces only "res:/", leaving a trailing slash, it is removed here.
+ project = project[..^1];
var execCommand = _editorSettings.GetSetting(Settings.CustomExecPath).As<string>();
var execArgs = _editorSettings.GetSetting(Settings.CustomExecPathArgs).As<string>();
var args = new List<string>();
@@ -226,6 +229,7 @@ namespace GodotTools
hasFileFlag = true;
}
+ arg = arg.ReplaceN("{project}", project);
arg = arg.ReplaceN("{file}", file);
args.Add(arg);