summaryrefslogtreecommitdiff
path: root/modules/gdscript/gdscript_cache.cpp
diff options
context:
space:
mode:
authorAdam Scott <ascott.ca@gmail.com>2022-11-23 18:13:13 -0500
committerAdam Scott <ascott.ca@gmail.com>2022-11-25 12:43:55 -0500
commit69bb7e5b1199e6af3256fe948dbfa3102c1ccbc8 (patch)
tree236e44820e52425db97818d259d57104a4ae87ea /modules/gdscript/gdscript_cache.cpp
parentfa270c2456df5ad12f51584c4ff891e2cf728cec (diff)
Fix singleton scene cyclic loading
Diffstat (limited to 'modules/gdscript/gdscript_cache.cpp')
-rw-r--r--modules/gdscript/gdscript_cache.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp
index f35318e4c6..2e7263b652 100644
--- a/modules/gdscript/gdscript_cache.cpp
+++ b/modules/gdscript/gdscript_cache.cpp
@@ -365,31 +365,6 @@ Ref<PackedScene> GDScriptCache::get_packed_scene(const String &p_path, Error &r_
return scene;
}
-Ref<GDScript> GDScriptCache::get_packed_scene_script(const String &p_path, Error &r_error) {
- r_error = OK;
- Ref<PackedScene> scene = get_packed_scene(p_path, r_error);
-
- if (r_error != OK) {
- return Ref<GDScript>();
- }
-
- int node_count = scene->get_state()->get_node_count();
- if (node_count == 0) {
- return Ref<GDScript>();
- }
-
- const int ROOT_NODE = 0;
- for (int i = 0; i < scene->get_state()->get_node_property_count(ROOT_NODE); i++) {
- if (scene->get_state()->get_node_property_name(ROOT_NODE, i) != SNAME("script")) {
- continue;
- }
-
- return scene->get_state()->get_node_property_value(ROOT_NODE, i);
- }
-
- return Ref<GDScript>();
-}
-
void GDScriptCache::clear_unreferenced_packed_scenes() {
if (singleton == nullptr) {
return;