RES ResourceFormatImporter::load(const String &p_path, const String &p_original_path, Error *r_error) { PathAndType pat; Error err = _get_path_and_type(p_path, pat); if (err != OK) { if (r_error) *r_error = err; return RES(); } RES res = ResourceLoader::_load(pat.path, p_path, pat.type, false, r_error); #ifdef TOOLS_ENABLED if (res.is_valid()) { res->set_import_last_modified_time(res->get_last_modified_time()); //pass this, if used res->set_import_path(pat.path); } #endif return res; }