compile

fun compile(priority: Material.CompilerPriorityQueue, variants: Int = UserVariantFilterBit.ALL, callback: (MaterialInstance) -> Unit? = null)

Asynchronously ensures that a subset of this MaterialInstance's variants are compiled, taking its specialization constants into account.

Parameters

priority

Which priority queue to use (CRITICAL, HIGH, or LOW).

variants

Variants to compile (a mask of UserVariantFilterBit values).

callback

Optional callback invoked on the main thread with this instance when compilation completes.

See also