From edd37eccd486fe114f5a7fc742e817ea37d854b2 Mon Sep 17 00:00:00 2001 From: Benjamin Bäumler Date: Mon, 27 Feb 2017 15:20:47 +0100 Subject: fix custom scene arguments from the editor sequel of #7347 Play edited scene and Play custom scene didn't worked when main_run_args hadn't $scene as argument. Changes/Fixes the way how the editor handles scene paths when starting the project/a scene Play the project - no scene path Play the edited scene - scene path of active scene in the editor Play custom scene - scene path of custom scene main_arg_runs is now empty by default and $scene won't be replaced by the scene path anymore Changed declaration if EditorRun::run, to remove a unused value--- tools/editor/editor_run.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools/editor/editor_run.cpp') diff --git a/tools/editor/editor_run.cpp b/tools/editor/editor_run.cpp index a5d39db6b..46e400ae7 100644 --- a/tools/editor/editor_run.cpp +++ b/tools/editor/editor_run.cpp @@ -35,7 +35,7 @@ EditorRun::Status EditorRun::get_status() const { return status; } -Error EditorRun::run(const String& p_scene,const String p_custom_args,const List& p_breakpoints,const String& p_edited_scene) { +Error EditorRun::run(const String& p_scene,const String p_custom_args,const List& p_breakpoints) { List args; @@ -141,11 +141,15 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List args.push_back(bpoints); } + + if (p_scene!="") { + args.push_back(p_scene); + } if (p_custom_args!="") { Vector cargs=p_custom_args.split(" ",false); for(int i=0;i