loadSync
Blocks the current thread until the asset with T type is loaded from the given path.
This method is safe to call from the main rendering thread, as well as other application threads. However, avoid loading the same asset or assets with the same dependencies with both synchronous loadSync and asynchronous load or loadAsync, and avoid running this method from within coroutines.
This method should be used only to load crucial assets that are needed to initiate the application, e.g. assets required to display the loading screen. Whenever possible, prefer load and loadAsync.
Might throw the following exceptions:
MissingAssetException when attempting to load an asset that was already scheduled for asynchronous loading.
UnloadedAssetException if the asset unloaded asynchronously by another coroutine.
MissingLoaderException if the AssetLoader for asset of requested type is not registered.
InvalidLoaderException if the AssetLoader implementation of requested type is invalid.
AssetLoadingException if the AssetLoader has thrown an exception during loading.
MissingDependencyException is the AssetLoader is unable to obtain an instance of asset's dependency.
UnsupportedMethodException is the AssetLoader uses unsupported operation on AssetManagerWrapper.
If the asset was already loaded, added or scheduled for loading, this method will either return the asset immediately if it is loaded, or throw MissingAssetException if it is unloaded. In either case, it will increase the reference count of the asset - see getReferenceCount and unload for details.
Blocks the current thread until the asset with T type is loaded with data specified by the identifier and optional loading parameters.
This method is safe to call from the main rendering thread, as well as other application threads. However, avoid loading the same asset or assets with the same dependencies with both synchronous loadSync and asynchronous load or loadAsync, and avoid running this method from within coroutines.
This method should be used only to load crucial assets that are needed to initiate the application, e.g. assets required to display the loading screen. Whenever possible, prefer load and loadAsync.
Might throw the following exceptions:
MissingAssetException when attempting to load an asset that was already scheduled for asynchronous loading.
UnloadedAssetException if the asset unloaded asynchronously by another coroutine.
MissingLoaderException if the AssetLoader for asset of requested type is not registered.
InvalidLoaderException if the AssetLoader implementation of requested type is invalid.
AssetLoadingException if the AssetLoader has thrown an exception during loading.
MissingDependencyException is the AssetLoader is unable to obtain an instance of asset's dependency.
UnsupportedMethodException is the AssetLoader uses unsupported operation on AssetManagerWrapper.
If the asset was already loaded, added or scheduled for loading, this method will either return the asset immediately if it is loaded, or throw MissingAssetException if it is unloaded. In either case, it will increase the reference count of the asset - see getReferenceCount and unload for details.
Blocks the current thread until the asset with T type is loaded using the asset descriptor.
This method is safe to call from the main rendering thread, as well as other application threads. However, avoid loading the same asset or assets with the same dependencies with both synchronous loadSync and asynchronous load or loadAsync, and avoid running this method from within coroutines.
This method should be used only to load crucial assets that are needed to initiate the application, e.g. assets required to display the loading screen. Whenever possible, prefer load and loadAsync.
Might throw the following exceptions:
MissingAssetException when attempting to load an asset that was already scheduled for asynchronous loading.
UnloadedAssetException if the asset unloaded asynchronously by another coroutine.
MissingLoaderException if the AssetLoader for asset of requested type is not registered.
InvalidLoaderException if the AssetLoader implementation of requested type is invalid.
AssetLoadingException if the AssetLoader has thrown an exception during loading.
MissingDependencyException is the AssetLoader is unable to obtain an instance of asset's dependency.
UnsupportedMethodException is the AssetLoader uses unsupported operation on AssetManagerWrapper.
If the asset was already loaded, added or scheduled for loading, this method will either return the asset immediately if it is loaded, or throw MissingAssetException if it is unloaded. In either case, it will increase the reference count of the asset - see getReferenceCount and unload for details.