Merge pull request #114655 from HolonProduction/gdscript/back-to-the-roots
GDScript: Only move root scripts in cache
This commit is contained in:
commit
8a9e559008
1 changed files with 3 additions and 1 deletions
|
|
@ -1095,7 +1095,9 @@ void GDScript::set_path(const String &p_path, bool p_take_over) {
|
|||
String old_path = path;
|
||||
path = p_path;
|
||||
path_valid = true;
|
||||
GDScriptCache::move_script(old_path, p_path);
|
||||
if (is_root_script()) {
|
||||
GDScriptCache::move_script(old_path, p_path);
|
||||
}
|
||||
|
||||
for (KeyValue<StringName, Ref<GDScript>> &kv : subclasses) {
|
||||
kv.value->set_path(p_path, p_take_over);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue