You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Speed up scene group scanning for text scenes
This commit is contained in:
@@ -1891,7 +1891,7 @@ void EditorFileSystem::_update_scene_groups() {
|
||||
continue;
|
||||
}
|
||||
|
||||
const HashSet<StringName> scene_groups = _get_scene_groups(path);
|
||||
const HashSet<StringName> scene_groups = PackedScene::get_scene_groups(path);
|
||||
if (!scene_groups.is_empty()) {
|
||||
ProjectSettings::get_singleton()->add_scene_groups_cache(path, scene_groups);
|
||||
}
|
||||
@@ -1935,12 +1935,6 @@ void EditorFileSystem::_get_all_scenes(EditorFileSystemDirectory *p_dir, HashSet
|
||||
}
|
||||
}
|
||||
|
||||
HashSet<StringName> EditorFileSystem::_get_scene_groups(const String &p_path) {
|
||||
Ref<PackedScene> packed_scene = ResourceLoader::load(p_path);
|
||||
ERR_FAIL_COND_V(packed_scene.is_null(), HashSet<StringName>());
|
||||
return packed_scene->get_state()->get_all_groups();
|
||||
}
|
||||
|
||||
void EditorFileSystem::update_file(const String &p_file) {
|
||||
ERR_FAIL_COND(p_file.is_empty());
|
||||
update_files({ p_file });
|
||||
|
||||
Reference in New Issue
Block a user