MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / get_resource_script_class

Method get_resource_script_class

compat/resource_compat_binary.cpp:1784–1794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1782}
1783
1784String ResourceFormatLoaderCompatBinary::get_resource_script_class(const String &p_path) const {
1785 Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::READ);
1786 if (f.is_null()) {
1787 return ""; //could not read
1788 }
1789
1790 ResourceLoaderCompatBinary loader;
1791 loader.local_path = p_path; // No need for local path, it only gets used in error messages.
1792 loader.res_path = loader.local_path;
1793 return loader.recognize_script_class(f);
1794}
1795
1796ResourceUID::ID ResourceFormatLoaderCompatBinary::get_resource_uid(const String &p_path) const {
1797 String ext = p_path.get_extension().to_lower();

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected