get

inline operator fun <T> get(path: String): T

Returns a loaded asset of type T loaded from selected path or throws MissingAssetException if the asset is not loaded yet or was never scheduled for loading. Rethrows any exceptions encountered during asset loading.

T is the type of the asset. Must match the type requested during loading. path must match the asset path passed during loading.

This method might throw the following exceptions:

See also getOrNull and getAsync.


operator fun <T> get(descriptor: AssetDescriptor<T>): T

Returns a loaded asset of type T described by descriptor or throws MissingAssetException if the asset is not loaded yet or was never scheduled for loading. Rethrows any exceptions encountered during asset loading.

T is the type of the asset. Must match the type requested during loading. descriptor contains the asset data. See getAssetDescriptor.

This method might throw the following exceptions:

See also getOrNull and getAsync.


operator fun <T> get(identifier: Identifier<T>): T

Returns a loaded asset of type T identified by identifier or throws MissingAssetException if the asset is not loaded yet or was never scheduled for loading. Rethrows any exceptions encountered during asset loading.

T is the type of the asset. Must match the type requested during loading. identifier uniquely identifies a file by its path and type. See Identifier.

This method might throw the following exceptions:

See also getOrNull and getAsync.