diff --git a/modules/gdscript/gdscript_cache.cpp b/modules/gdscript/gdscript_cache.cpp index add36591f3f..2e7263b6521 100644 --- a/modules/gdscript/gdscript_cache.cpp +++ b/modules/gdscript/gdscript_cache.cpp @@ -342,7 +342,12 @@ Ref GDScriptCache::get_packed_scene(const String &p_path, Error &r_ return singleton->packed_scene_cache[p_path]; } - Ref scene; + Ref scene = ResourceCache::get_ref(p_path); + if (scene.is_valid()) { + singleton->packed_scene_cache[p_path] = scene; + singleton->packed_scene_dependencies[p_path].insert(p_owner); + return scene; + } scene.instantiate(); r_error = OK;