load
Loads a TextureResource from a file path.
Note: For complex or high-resolution resources that require significant processing time, it is strongly recommended to leverage coroutines for loading. This approach prevents blocking the main thread, ensuring a responsive and fluid user experience.
Return
The loaded TextureResource.
Parameters
The file path of the texture.
The loading method; defaults to FROM_ASSETS.
Options for creating the texture resource.
Throws
If an error occurs during the loading process.
Loads a TextureResource from a file path.
Return
The loaded TextureResource.
Parameters
The file path of the texture.
The loading method; defaults to FROM_ASSETS.
Throws
If an error occurs during the loading process.
Note: For complex or high-resolution resources that require significant processing time, it is strongly recommended to leverage coroutines for loading. This approach prevents blocking the main thread, ensuring a responsive and fluid user experience.