From f8d03b98e7eeeb726af4f653f1fde8b063cbad14 Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 11 Feb 2021 14:18:45 -0300 Subject: Improve resource load cache -Added a new method in Resource: reset_state , used for reloading the same resource from disk -Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type) -Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving. --- scene/resources/skin.h | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/resources/skin.h') diff --git a/scene/resources/skin.h b/scene/resources/skin.h index d5f5e2085b..f5d64f96aa 100644 --- a/scene/resources/skin.h +++ b/scene/resources/skin.h @@ -52,6 +52,7 @@ protected: bool _get(const StringName &p_name, Variant &r_ret) const; void _get_property_list(List *p_list) const; + virtual void reset_state() override; static void _bind_methods(); public: -- cgit v1.2.3