Back to Filament

destroyMaterial

docs/android/dokka/filament-android/com.google.android.filament/-engine/destroy-material.md

1.75.0769 B
Original Source

//filament-android/com.google.android.filament/Engine/destroyMaterial

destroyMaterial

[main]
open fun destroyMaterial(material: Material)

Destroys a Material and frees all its associated resources.

All MaterialInstance of the specified Material must be destroyed before destroying it.

Parameters

main

materialthe Material to destroy

Throws

RuntimeExceptionif some MaterialInstances remain.