loadModelSuspend

suspend fun loadModelSuspend(name: String): Entity

Asynchronously loads a model by its name. This is a suspend function.

Return

An entity representing the root node of the loaded model scene, or null if the model can not be loaded.

Parameters

name

The name of the model to be loaded from the AssetBundle.

Throws

IllegalStateException

If the asset bundle is closed.

If any error occurs during the loading process.