createInstancedAsset

Create a FilamentAsset with pre-allocated instances.

Similar to createAsset(), but allows specifying pre-built FilamentInstance objects to avoid repeated instantiation of the same asset.

Return

A new FilamentAsset with the provided instances, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data.

instances

Array of pre-created FilamentInstance objects.

Create a FilamentAsset with pre-allocated instances.

Similar to createAsset(), but allows specifying pre-built FilamentInstance objects to avoid repeated instantiation of the same asset.

Return

A new FilamentAsset with the provided instances, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data.

instances

Array of pre-created FilamentInstance objects.

Create a FilamentAsset with pre-allocated instances.

Similar to createAsset(), but allows specifying pre-built FilamentInstance objects to avoid repeated instantiation of the same asset.

Return

A new FilamentAsset with the provided instances, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data.

instances

Array of pre-created FilamentInstance objects.

Create a FilamentAsset with pre-allocated instances.

Similar to createAsset(), but allows specifying pre-built FilamentInstance objects to avoid repeated instantiation of the same asset.

Return

A new FilamentAsset with the provided instances, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data.

instances

Array of pre-created FilamentInstance objects.

Create a FilamentAsset with pre-allocated instances.

Similar to createAsset(), but allows specifying pre-built FilamentInstance objects to avoid repeated instantiation of the same asset.

Return

A new FilamentAsset with the provided instances, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data.

instances

Array of pre-created FilamentInstance objects.