33 #include "safe_refcount.h" 35 #include "reference.h" 36 #include "object_type_db.h" 42 #define RES_BASE_EXTENSION(m_ext)\ 44 static void register_custom_data_to_otdb() { ObjectTypeDB::add_resource_base_extension(m_ext,get_type_static()); }\ 45 virtual String get_base_extension() const { return m_ext; }\ 65 virtual bool _use_builtin_script()
const {
return false; }
66 static void _bind_methods();
69 void set_editor(
const String& p_editor);
72 void add_source(
const String& p_path,
const String& p_md5=
"");
73 String get_source_path(
int p_idx)
const;
74 String get_source_md5(
int p_idx)
const;
75 void set_source_md5(
int p_idx,
const String& p_md5);
76 void remove_source(
int p_idx);
77 int get_source_count()
const;
81 bool has_option(
const String& p_key)
const;
92 OBJ_CATEGORY(
"Resources");
93 RES_BASE_EXTENSION(
"res");
104 virtual bool _use_builtin_script()
const {
return true; }
108 uint64_t last_modified_time;
115 void notify_change_to_owners();
117 virtual void _resource_path_changed();
118 static void _bind_methods();
120 void _set_path(
const String& p_path);
121 void _take_over_path(
const String& p_path);
124 virtual bool can_reload_from_file();
125 virtual void reload_from_file();
127 void register_owner(
Object *p_owner);
128 void unregister_owner(
Object *p_owner);
130 void set_name(
const String& p_name);
133 virtual void set_path(
const String& p_path,
bool p_take_over=
false);
136 void set_subindex(
int p_sub_index);
137 int get_subindex()
const;
147 virtual void set_last_modified_time(uint64_t p_time) { last_modified_time=p_time; }
148 uint64_t get_last_modified_time()
const {
return last_modified_time; }
152 virtual RID get_rid()
const;
165 friend void unregister_core_types();
169 static void reload_externals();
170 static bool has(
const String& p_path);
172 static void dump(
const char* p_file=NULL,
bool p_short=
false);
174 static int get_cached_resource_count();
Definition: reference.h:78
Definition: reference.h:40
Definition: resource.h:89
Definition: resource.h:162