load

@JvmStatic
fun load(path: String, loadType: LoadType = LoadType.FROM_ASSETS, option: TextureCreateOption = TextureCreateOption()): TextureResource

Loads texture resource via 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 TextureResource which load.

Parameters

path

The given path.

loadType

The different ways of loading type, default is FROM_ASSETS.

option

The texture resource creating option.

Throws

If an error occurs during the loading process.


@JvmStatic
fun load(path: String, loadType: LoadType = LoadType.FROM_ASSETS): TextureResource

Loads texture resource via file path.

Return

The TextureResource which load.

Parameters

path

The given path.

loadType

The different ways of loading type, default is 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.