| 1856 | } |
| 1857 | |
| 1858 | ResourceUID::ID ResourceFormatLoaderCompatText::get_resource_uid(const String &p_path) const { |
| 1859 | String ext = p_path.get_extension().to_lower(); |
| 1860 | |
| 1861 | if (ext != "tscn" && ext != "tres") { |
| 1862 | return ResourceUID::INVALID_ID; |
| 1863 | } |
| 1864 | |
| 1865 | Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ); |
| 1866 | if (f.is_null()) { |
| 1867 | return ResourceUID::INVALID_ID; //could not read |
| 1868 | } |
| 1869 | |
| 1870 | ResourceLoaderCompatText loader; |
| 1871 | // Not actually used by get_uid() |
| 1872 | // loader.local_path = GDRESettings::get_singleton()->localize_path(p_path); |
| 1873 | // loader.res_path = loader.local_path; |
| 1874 | return loader.get_uid(f); |
| 1875 | } |
| 1876 | |
| 1877 | bool ResourceFormatLoaderCompatText::has_custom_uid_support() const { |
| 1878 | return CompatFormatLoader::has_custom_uid_support(); |