loadSuspend
Asynchronously loads a 3D model from the specified URI string and returns its root entity.
For content:// scheme, use Entity.loadSuspend(contentResolver: ContentResolver, uri: Uri) instead.
Return
The loaded root entity, which is attached to the scene. If any error occurs during the loading process, an ResourceLoadingException will be thrown.
Parameters
The URI representing the location of the 3D model to load. Currently supported schemes include asset:// and file://.
Asynchronously loads a 3D model from a file and returns its root entity.
Return
The loaded root entity, which is attached to the scene. If any error occurs during the loading process, an ResourceLoadingException will be thrown.
Parameters
The file containing the 3D model data to load. Supported file formats are .usdz and .glb.
Asynchronously loads a 3D model from a content provider URI and returns its root entity.
For asset:// or file:// scheme, use Entity.load(uriString: String) instead.
Return
The loaded root entity, which is attached to the scene. If any error occurs during the loading process, an ResourceLoadingException will be thrown.
Parameters
The ContentResolver for accessing the content provider.
The content Uri pointing to the 3D model data. Only content:// scheme is supported.
Asynchronously loads a 3D model from an InputStream and returns its root entity.
Return
The loaded root entity, which is attached to the scene. If any error occurs during the loading process, an ResourceLoadingException will be thrown.
Parameters
The InputStream containing the raw model data.
The ModelFormat of the source of the InputStream that should be specified explicitly.
Asynchronously loads an entity from the specified model name in the AssetBundle, and the root node will be returned as an entity.
Return
The loaded root entity, which is attached to the scene. If any error occurs during the loading process, an ResourceLoadingException will be thrown.
Parameters
The name of the model in the asset bundle.
The asset bundle containing the model.