Skip to main content

Crate gltforge_unity_export

Crate gltforge_unity_export 

Source

Modules§

build
error
export_context
mesh_data
node_data
submesh_data

Functions§

gltforge_export_add_mesh
Add a mesh to the export context. Returns the mesh index.
gltforge_export_add_node
Add a node (GameObject) to the export context. Returns the node index.
gltforge_export_begin
Create a new export context.
gltforge_export_finish
Build and write the .gltf and .bin files. path is the output .gltf file path (null-terminated UTF-8). Returns 1 on success, 0 on failure. Consumes and frees the context in both cases.
gltforge_export_finish_glb
Build and write a single .glb file (binary glTF). path is the output .glb file path (null-terminated UTF-8). Returns 1 on success, 0 on failure. Consumes and frees the context in both cases.
gltforge_export_free
Free an export context without writing any files.
gltforge_export_mesh_add_submesh_u16
Add a sub-mesh with 16-bit indices to mesh mesh_idx.
gltforge_export_mesh_add_submesh_u32
Add a sub-mesh with 32-bit indices to mesh mesh_idx.
gltforge_export_mesh_set_normals
Set vertex normals for mesh mesh_idx. ptr points to f32_count floats as tightly packed [x, y, z] triples (Unity space).
gltforge_export_mesh_set_positions
Set vertex positions for mesh mesh_idx. ptr points to f32_count floats as tightly packed [x, y, z] triples (Unity space).
gltforge_export_mesh_set_uvs
Set a UV channel for mesh mesh_idx. channel is 0-based. ptr points to f32_count floats as [u, v] pairs (Unity space).
gltforge_export_node_set_mesh
Attach mesh mesh_idx to node node_idx.