setLoader

inline fun <T> setLoader(suffix: String? = null, noinline loaderProvider: () -> Loader<T>)

Associates the AssetLoader with specific asset type determined by T. loaderProvider should create a new instance of loader of the selected types. Optional suffix can be passed if the loader should handle only the files with a specific file name suffix or extension.

Throws InvalidLoaderException if the AssetLoader does not extend SynchronousAssetLoader or AsynchronousAssetLoader.


fun <T> setLoader(type: Class<T>, suffix: String? = null, loaderProvider: () -> Loader<T>)

Internal API exposed for inlined method. See inlined setLoader with reified generics. Associates the AssetLoader with type under the specified optional suffix.

Throws InvalidLoaderException if the AssetLoader does not extend SynchronousAssetLoader or AsynchronousAssetLoader.