Browse Source

Add missing packed scene cache clear inside `GDScriptCache::clear()`

Adam Scott 2 năm trước cách đây
mục cha
commit
59c6642f2a
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      modules/gdscript/gdscript_cache.cpp

+ 5 - 0
modules/gdscript/gdscript_cache.cpp

@@ -398,6 +398,11 @@ void GDScriptCache::clear() {
 			E->clear();
 	}
 
+	for (KeyValue<String, HashSet<String>> &E : singleton->packed_scene_dependencies) {
+		singleton->packed_scene_dependencies.erase(E.key);
+		singleton->packed_scene_cache.erase(E.key);
+	}
+
 	parser_map_refs.clear();
 	singleton->parser_map.clear();
 	singleton->shallow_gdscript_cache.clear();