You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
EditorNode: Add function to load file as scene or resource
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user