Cache EditorResourcePicker's allowed types

This commit is contained in:
Yuri Sizov
2021-08-03 16:52:12 +03:00
parent ba2e6c66cb
commit decd548223
3 changed files with 40 additions and 10 deletions

View File

@ -40,6 +40,8 @@
class EditorResourcePicker : public HBoxContainer {
GDCLASS(EditorResourcePicker, HBoxContainer);
static HashMap<StringName, List<StringName>> allowed_types_cache;
String base_type;
RES edited_resource;
@ -97,6 +99,8 @@ protected:
void _notification(int p_what);
public:
static void clear_caches();
void set_base_type(const String &p_base_type);
String get_base_type() const;
Vector<String> get_allowed_types() const;