You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Never duplicate Scripts when duplicating resources recursively
This allows to duplicate PackedScenes safely Fixes #108220
This commit is contained in:
@@ -298,6 +298,12 @@ Variant Resource::_duplicate_recursive(const Variant &p_variant, const Duplicate
|
||||
DEV_ASSERT(false);
|
||||
}
|
||||
}
|
||||
if (should_duplicate) {
|
||||
Ref<Script> scr = sr;
|
||||
if (scr.is_valid()) {
|
||||
should_duplicate = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (should_duplicate) {
|
||||
|
||||
Reference in New Issue
Block a user