mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 10:44:26 +00:00
EditorNode: Add function to load file as scene or resource
This commit is contained in:
parent
c2ba0a8646
commit
d2d02d0ea8
16 changed files with 57 additions and 142 deletions
|
|
@ -548,7 +548,7 @@ void VersionControlEditorPlugin::_cell_button_pressed(Object *p_item, int p_colu
|
|||
|
||||
file_path = "res://" + file_path;
|
||||
if (ResourceLoader::get_resource_type(file_path) == "PackedScene") {
|
||||
EditorNode::get_singleton()->open_request(file_path);
|
||||
EditorNode::get_singleton()->load_scene(file_path);
|
||||
} else if (file_path.ends_with(".gd")) {
|
||||
EditorNode::get_singleton()->load_resource(file_path);
|
||||
ScriptEditor::get_singleton()->reload_scripts();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue