Interface IInstantiator
After parsing and loading a glTF's content and converting its content into Unity resources,the second step is instantiation. Implementors of this interface can convert glTF resources into scene objects.
Namespace: GLTFast
Assembly: solution.dll
Syntax
public interface IInstantiator
Methods
Name | Description |
---|---|
AddAnimation(AnimationClip[]) | Adds animation clips to the current scene. Only available if the built-in Animation module is enabled. |
AddCamera(uint, uint) | Called when a node has a camera assigned |
AddLightPunctual(uint, uint) | Called when a node has a punctual light assigned (KHR_lights_punctual) |
AddPrimitive(uint, string, MeshResult, uint[], uint?, float[], int) | Called for adding a Primitive/Mesh to a Node. |
AddPrimitiveInstanced(uint, string, MeshResult, uint, NativeArray<Vector3>?, NativeArray<Quaternion>?, NativeArray<Vector3>?, int) | Called for adding a Primitive/Mesh to a Node that uses GPU instancing (EXT_mesh_gpu_instancing) to render the same mesh/material combination many times. Similar to/called instead of AddPrimitive(uint, string, MeshResult, uint[], uint?, float[], int), without joints/skin support. |
BeginScene(string, uint[]) | Starts creating a scene instance. Has to be called at first and concluded by calling EndScene(uint[]). |
CreateNode(uint, uint?, Vector3, Quaternion, Vector3) | Called for every Node in the glTF file |
EndScene(uint[]) | Is called at last, after all scene content has been created. Immediately afterwards the scene will be rendered, so use it to finally prepare the instance. |
SetNodeName(uint, string) | Sets the name of a node. If a node has no name it falls back to the first valid mesh name. Null otherwise. |