loadSuspending

suspend fun <T : Any> loadSuspending(file: VfsFile, clazz: KClass<T>, parameters: GameAssetParameters = EmptyGameAssetParameter()): GameAsset<T>
inline suspend fun <T : Any> loadSuspending(file: VfsFile, parameters: GameAssetParameters = EmptyGameAssetParameter()): GameAsset<T>

Loads an asset in a suspending function.

See also

Parameters

T

concrete class of Any instance that should be loaded.

file

the file to load

parameters

any parameters that need setting when loading the asset