loadMeshResource

fun loadMeshResource(path: String): MeshResource

Loads a mesh resource from the specified path.

WARNING:

  • This method performs blocking I/O. While it can be called on the main thread, on slow devices or with unstable storage it may cause jank or even ANR.

  • Prefer invoking this from a background thread or within a coroutine context such as withContext(Dispatchers.IO).

Return

Returns a MeshResource object representing the loaded mesh.

Parameters

path

The path to the mesh resource within the AssetBundle.

Throws

IllegalStateException

If the asset bundle is closed.

If any error occurs during the loading process.