Back to Filament

createInstance

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

1.75.0959 B
Original Source

//filament-android/com.google.android.filament/Material/createInstance

createInstance

[main]
open fun createInstance(): MaterialInstance

Creates a new instance of this material. Material instances should be freed using destroyMaterialInstance.

Return

the new instance

[main]
open fun createInstance(name: String): MaterialInstance

Creates a new instance of this material with a specified name. Material instances should be freed using destroyMaterialInstance.

Return

the new instance

Parameters

main

namearbitrary label to associate with the given material instance