diff options
| author | bebae | 2016-12-21 15:32:52 +0100 |
|---|---|---|
| committer | bebae | 2016-12-21 22:11:50 +0100 |
| commit | abdedc35224ce499ea49dd996b44344432dbf510 (patch) | |
| tree | 9ff63d0aa2866e2a06c0c71e4fd8f9a3711befcd /tools/editor/editor_run.cpp | |
| parent | 2c8a1729152f5bcb1cb81d24b1e642634bff7174 (diff) | |
| download | godot-abdedc35224ce499ea49dd996b44344432dbf510.tar.gz godot-abdedc35224ce499ea49dd996b44344432dbf510.tar.zst godot-abdedc35224ce499ea49dd996b44344432dbf510.zip | |
Allows to start the scene with custom arguments within the editor
fixes #7346
Path from the current scene isn't added too the argumens anymore by default and needs to be added throug the custom arguments, with $scene. Matches the behaviour of the executable without any arguments.
Custom Arguments are read from editor/main_run_args
Diffstat (limited to '')
| -rw-r--r-- | tools/editor/editor_run.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/editor/editor_run.cpp b/tools/editor/editor_run.cpp index 5fbb4ae2a..762884170 100644 --- a/tools/editor/editor_run.cpp +++ b/tools/editor/editor_run.cpp @@ -55,15 +55,6 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List args.push_back("-epid"); args.push_back(String::num(OS::get_singleton()->get_process_ID())); - if (p_custom_args!="") { - - Vector<String> cargs=p_custom_args.split(" ",false); - for(int i=0;i<cargs.size();i++) { - - args.push_back(cargs[i].replace("%20"," ").replace("$scene",p_edited_scene.replace(" ","%20"))); - } - } - if (debug_collisions) { args.push_back("-debugcol"); } @@ -150,7 +141,12 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List args.push_back(bpoints); } - args.push_back(p_scene); + if (p_custom_args!="") { + Vector<String> cargs=p_custom_args.split(" ",false); + for(int i=0;i<cargs.size();i++) { + args.push_back(cargs[i].replace("$scene",p_scene).replace(" ","%20")); + } + } String exec = OS::get_singleton()->get_executable_path(); |
