You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
EditorNode: Add function to load file as scene or resource
This commit is contained in:
@@ -349,11 +349,7 @@ void EditorAutoloadSettings::_autoload_activated() {
|
||||
}
|
||||
|
||||
void EditorAutoloadSettings::_autoload_open(const String &fpath) {
|
||||
if (ResourceLoader::get_resource_type(fpath) == "PackedScene") {
|
||||
EditorNode::get_singleton()->open_request(fpath);
|
||||
} else {
|
||||
EditorNode::get_singleton()->load_resource(fpath);
|
||||
}
|
||||
EditorNode::get_singleton()->load_scene_or_resource(fpath);
|
||||
ProjectSettingsEditor::get_singleton()->hide();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user