createAsset

actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

Parses the glTF content and creates an asset with entities, materials, and buffers. External resources (textures, buffer data) must be loaded separately using ResourceLoader.

Return

A new FilamentAsset, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data (JSON or GLB format).

expect fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

Parses the glTF content and creates an asset with entities, materials, and buffers. External resources (textures, buffer data) must be loaded separately using ResourceLoader.

Return

A new FilamentAsset, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data (JSON or GLB format).

actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

Parses the glTF content and creates an asset with entities, materials, and buffers. External resources (textures, buffer data) must be loaded separately using ResourceLoader.

Return

A new FilamentAsset, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data (JSON or GLB format).

actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

Parses the glTF content and creates an asset with entities, materials, and buffers. External resources (textures, buffer data) must be loaded separately using ResourceLoader.

Return

A new FilamentAsset, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data (JSON or GLB format).

actual fun createAsset(buffer: ByteArray): FilamentAsset?

Create a FilamentAsset from glTF 2.0 data.

Parses the glTF content and creates an asset with entities, materials, and buffers. External resources (textures, buffer data) must be loaded separately using ResourceLoader.

Return

A new FilamentAsset, or null if parsing failed.

Parameters

buffer

ByteArray containing glTF 2.0 data (JSON or GLB format).