mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Hacked around duplication bug. I think duplicate needs to be even smarter, maybe pass two bools? (containers and/or resources)
This commit is contained in:
@@ -3418,12 +3418,14 @@ Variant Variant::iter_get(const Variant &r_iter, bool &r_valid) const {
|
||||
Variant Variant::duplicate(bool deep) const {
|
||||
switch (type) {
|
||||
case OBJECT: {
|
||||
/* breaks stuff :(
|
||||
if (deep && !_get_obj().ref.is_null()) {
|
||||
Ref<Resource> resource = _get_obj().ref;
|
||||
if (resource.is_valid()) {
|
||||
return resource->duplicate(true);
|
||||
}
|
||||
}
|
||||
*/
|
||||
return *this;
|
||||
} break;
|
||||
case DICTIONARY:
|
||||
|
||||
Reference in New Issue
Block a user