Up to date
This page is up to date for Godot
If you still find outdated information, please open an issue.
A singleton for loading resource files.
A singleton used to load resource files from the filesystem.
It uses the many ResourceFormatLoader classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine.
Note: You have to import the files into the engine first to load them using load. If you want to load Images at run-time, you may use Image.load. If you want to import audio files, you can use the snippet described in AudioStreamMP3.data.
ThreadLoadStatus THREAD_LOAD_INVALID_RESOURCE =
The resource is invalid, or has not been loaded with load_threaded_request.
ThreadLoadStatus THREAD_LOAD_IN_PROGRESS =
The resource is still being loaded.
ThreadLoadStatus THREAD_LOAD_FAILED =
Some error occurred during loading and it failed.
ThreadLoadStatus THREAD_LOAD_LOADED =
The resource was loaded successfully and can be accessed via load_threaded_get.
CacheMode CACHE_MODE_IGNORE =
CacheMode CACHE_MODE_REUSE =
CacheMode CACHE_MODE_REPLACE =
This method is performed implicitly for ResourceFormatLoaders written in GDScript (see ResourceFormatLoader for more information).
Returns whether a recognized resource exists for the given
type_hint can be used to further specify the Resource type that should be handled by the ResourceFormatLoader. Anything that inherits from Resource can be used as a type hint, for example Image.
Returns the dependencies for the resource at the given
Note: The dependencies are returned with slices separated by
::. You can use String.get_slice to get their components.
for dep in ResourceLoader.get_dependencies(path): print(dep.get_slice("::", 0)) <