From 9f6c0c6eaef754f2049ee536c5b38bfdc65fbd08 Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Fri, 9 Mar 2018 21:16:08 +0200 Subject: Duplicate Arrays and Dictionaries when instancing scene in editor Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate Fixes #13971 --- core/resource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/resource.cpp') diff --git a/core/resource.cpp b/core/resource.cpp index 2eeed50d9..179333aa1 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -226,7 +226,7 @@ Ref 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; -- cgit v1.2.3-70-g09d2