prepare

fun <T : Any> prepare(action: suspend () -> T): PreparableGameAsset<T>

Prepares a value once assets have finished loading. This acts the same as lazy except this will invoke the action once loading is finished to ensure everything is initialized before the first frame.

See also

Parameters

action

the action to initialize this value