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
This commit is contained in:
parent
df365fdc3c
commit
edd37eccd4
3 changed files with 19 additions and 24 deletions
|
|
@ -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<String>& p_breakpoints,const String& p_edited_scene) {
|
||||
Error EditorRun::run(const String& p_scene,const String p_custom_args,const List<String>& p_breakpoints) {
|
||||
|
||||
List<String> 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<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"));
|
||||
args.push_back(cargs[i].replace(" ","%20"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue