Back to Filament

compile

docs/android/dokka/filament-android/com.google.android.filament/-material-instance/compile.md

1.75.01.2 KB
Original Source

//filament-android/com.google.android.filament/MaterialInstance/compile

compile

[main]
open fun compile(priority: Material.CompilerPriorityQueue, variants: Int, handler: Any, callback: Runnable)

Asynchronously ensures that a subset of this MaterialInstance's variants are compiled.

This function behaves identically to compile, but takes into account the specific constants overridden by setConstant.

Parameters

main

priorityPriority of the compile command.
variantsVariants to include to the compile command.
handlerAn Executor. On Android this can also be a Handler.
callbackcallback called on the main thread when the compilation is done on by backend.

See also

Material
setConstant