Merge pull request #81847 from crazyStewie/dotnet_editor_project_fix
Implemented {project} placeholder for external dotnet editor
This commit is contained in:
commit
5fd8506e19
1 changed files with 4 additions and 0 deletions
|
@ -190,6 +190,9 @@ namespace GodotTools
|
||||||
case ExternalEditorId.CustomEditor:
|
case ExternalEditorId.CustomEditor:
|
||||||
{
|
{
|
||||||
string file = ProjectSettings.GlobalizePath(script.ResourcePath);
|
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 execCommand = _editorSettings.GetSetting(Settings.CustomExecPath).As<string>();
|
||||||
var execArgs = _editorSettings.GetSetting(Settings.CustomExecPathArgs).As<string>();
|
var execArgs = _editorSettings.GetSetting(Settings.CustomExecPathArgs).As<string>();
|
||||||
var args = new List<string>();
|
var args = new List<string>();
|
||||||
|
@ -226,6 +229,7 @@ namespace GodotTools
|
||||||
hasFileFlag = true;
|
hasFileFlag = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
arg = arg.ReplaceN("{project}", project);
|
||||||
arg = arg.ReplaceN("{file}", file);
|
arg = arg.ReplaceN("{file}", file);
|
||||||
args.Add(arg);
|
args.Add(arg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue