loadMaterialAsync

fun loadMaterialAsync(fileLocation: String, onResult: (Material?) -> Unit): Job

Loads a Material from the contents of a Filamat file within a created coroutine scope.

Parameters

fileLocation

the .filamat file location:

  • A relative asset file location materials/mymaterial.filamat

  • An Android resource from the res folder context.getResourceUri(R.raw.mymaterial)

  • A File path Uri.fromFile(myMaterialFile).path

  • An http or https url https://mydomain.com/mymaterial.filamat

See also