Identifier

data class Identifier<T>(val path: String, val type: Class<T>)

Uniquely identifies a single asset stored in an AssetStorage by its type and path.

Multiple assets with the same path can be stored in an AssetStorage as long as they have a different type. Similarly, AssetStorage can store multiple assets of the same type, as long as each has a different path.

Avoid using Identifier constructor directly. Instead, rely on AssetStorage.getIdentifier or AssetDescriptor.toIdentifier.

Constructors

Link copied to clipboard
constructor(path: String, type: Class<T>)

Properties

Link copied to clipboard

File path to the asset compatible with the AssetStorage.fileResolver. Must be normalized.

Link copied to clipboard
val type: Class<T>

Class of the asset specified during loading.

Functions

Link copied to clipboard
fun toAssetDescriptor(parameters: AssetLoaderParameters<T>? = null, fileHandle: FileHandle? = null): AssetDescriptor<T>

Converts this Identifier to an AssetDescriptor that describes the asset and its loading data.