summaryrefslogtreecommitdiff
path: root/core/resource.cpp
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-03-09 21:16:08 +0200
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2018-03-13 17:18:08 +0200
commit9f6c0c6eaef754f2049ee536c5b38bfdc65fbd08 (patch)
tree823f108360644d6403500810f31d08d7d5e37160 /core/resource.cpp
parentb84236944215445be191047ab628e570ffd69e99 (diff)
Duplicate Arrays and Dictionaries when instancing scene in editor
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate Fixes #13971
Diffstat (limited to 'core/resource.cpp')
-rw-r--r--core/resource.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/resource.cpp b/core/resource.cpp
index 2eeed50d9d..179333aa14 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -226,7 +226,7 @@ Ref<Resource> Resource::duplicate(bool p_subresources) const {
if (!(E->get().usage & PROPERTY_USAGE_STORAGE))
continue;
- Variant p = get(E->get().name);
+ Variant p = get(E->get().name).duplicate(true);
if (p.get_type() == Variant::OBJECT && p_subresources) {
RES sr = p;