1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #107671 from dsnopek/editor-run-control

Allow editor plugins to modify run arguments
This commit is contained in:
Thaddeus Crews
2025-10-20 18:09:32 -05:00
6 changed files with 37 additions and 1 deletions

View File

@@ -556,6 +556,13 @@ bool EditorPlugin::build() {
return success;
}
void EditorPlugin::run_scene(const String &p_scene, Vector<String> &r_args) {
Vector<String> new_args;
if (GDVIRTUAL_CALL(_run_scene, p_scene, r_args, new_args)) {
r_args = new_args;
}
}
void EditorPlugin::queue_save_layout() {
EditorNode::get_singleton()->save_editor_layout_delayed();
}
@@ -695,6 +702,7 @@ void EditorPlugin::_bind_methods() {
GDVIRTUAL_BIND(_set_window_layout, "configuration");
GDVIRTUAL_BIND(_get_window_layout, "configuration");
GDVIRTUAL_BIND(_build);
GDVIRTUAL_BIND(_run_scene, "scene", "args");
GDVIRTUAL_BIND(_enable_plugin);
GDVIRTUAL_BIND(_disable_plugin);