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

EditorNode: Add function to load file as scene or resource

This commit is contained in:
Lars Pettersson
2024-12-28 17:40:50 +01:00
parent c2ba0a8646
commit d2d02d0ea8
16 changed files with 57 additions and 142 deletions

View File

@@ -1597,7 +1597,7 @@ bool CanvasItemEditor::_gui_input_open_scene_on_double_click(const Ref<InputEven
if (selection.size() == 1) {
CanvasItem *ci = selection.front()->get();
if (!ci->get_scene_file_path().is_empty() && ci != EditorNode::get_singleton()->get_edited_scene()) {
EditorNode::get_singleton()->open_request(ci->get_scene_file_path());
EditorNode::get_singleton()->load_scene(ci->get_scene_file_path());
return true;
}
}