aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/editor_node.cpp
diff options
context:
space:
mode:
authorbebae2016-12-21 15:32:52 +0100
committerRémi Verschelde2017-01-12 19:15:28 +0100
commit0aebdb346a08be085f0e4b69098675cbf1145110 (patch)
tree0e0a9b0f4a78918b1b2f07e290094bac9edbbea5 /tools/editor/editor_node.cpp
parent71b35c527f7ab2451f9f627c14c74aa7f1f8c0a1 (diff)
downloadgodot-0aebdb346a08be085f0e4b69098675cbf1145110.tar.gz
godot-0aebdb346a08be085f0e4b69098675cbf1145110.tar.zst
godot-0aebdb346a08be085f0e4b69098675cbf1145110.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 (cherry picked from commit abdedc35224ce499ea49dd996b44344432dbf510)
Diffstat (limited to 'tools/editor/editor_node.cpp')
-rw-r--r--tools/editor/editor_node.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 42b9de840..5a11cd5c6 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -1852,7 +1852,6 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
run_filename=scene->get_filename();
} else {
- args=run_settings_dialog->get_custom_arguments();
current_filename=scene->get_filename();
}
@@ -1930,6 +1929,8 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
List<String> breakpoints;
editor_data.get_editor_breakpoints(&breakpoints);
+
+ args = Globals::get_singleton()->get("editor/main_run_args");
Error error = editor_run.run(run_filename,args,breakpoints,current_filename);
@@ -5398,7 +5399,7 @@ EditorNode::EditorNode() {
editor_import_export->load_config();
- GLOBAL_DEF("editor/main_run_args","$exec -path $path -scene $scene $main_scene");
+ GLOBAL_DEF("editor/main_run_args","$scene");
ObjectTypeDB::set_type_enabled("CollisionShape",true);
ObjectTypeDB::set_type_enabled("CollisionShape2D",true);