diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/io/resource_format_binary.cpp | 11 | ||||
-rw-r--r-- | core/io/resource_format_binary.h | 2 | ||||
-rw-r--r-- | core/object/script_language.h | 1 |
3 files changed, 9 insertions, 5 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index adae468d93..551d3268b8 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1970,14 +1970,17 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant if (E.usage & PROPERTY_USAGE_STORAGE) { Variant value = res->get(E.name); if (E.usage & PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT) { + NonPersistentKey npk; + npk.base = res; + npk.property = E.name; + non_persistent_map[npk] = value; + Ref<Resource> sres = value; if (sres.is_valid()) { - NonPersistentKey npk; - npk.base = res; - npk.property = E.name; - non_persistent_map[npk] = sres; resource_set.insert(sres); saved_resources.push_back(sres); + } else { + _find_resources(value); } } else { _find_resources(value); diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h index 30f1664983..e64485d404 100644 --- a/core/io/resource_format_binary.h +++ b/core/io/resource_format_binary.h @@ -139,7 +139,7 @@ class ResourceFormatSaverBinaryInstance { bool operator<(const NonPersistentKey &p_key) const { return base == p_key.base ? property < p_key.property : base < p_key.base; } }; - RBMap<NonPersistentKey, Ref<Resource>> non_persistent_map; + RBMap<NonPersistentKey, Variant> non_persistent_map; HashMap<StringName, int> string_map; Vector<StringName> strings; diff --git a/core/object/script_language.h b/core/object/script_language.h index 2b685c77a3..3ea6a6e4c3 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -263,6 +263,7 @@ public: }; struct ScriptError { + String path; int line = -1; int column = -1; String message; |