mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 18:03:35 +00:00
Speed up scene group scanning for text scenes
This commit is contained in:
parent
4ab8fb8093
commit
b83c64faac
4 changed files with 52 additions and 8 deletions
|
|
@ -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 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue