Method AddPrimitiveInstanced
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.
Declaration
public void AddPrimitiveInstanced(uint nodeIndex, string meshName, MeshResult meshResult, uint instanceCount, NativeArray<Vector3>? positions, NativeArray<Quaternion>? rotations, NativeArray<Vector3>? scales, int primitiveNumeration = 0)
Parameters
Type | Name | Description |
---|---|---|
uint | nodeIndex | Index of the node |
string | meshName | Mesh's name |
MeshResult | meshResult | The converted Mesh |
uint | instanceCount | Number of instances |
NativeArray<Vector3>? | positions | Instance positions |
NativeArray<Quaternion>? | rotations | Instance rotations |
NativeArray<Vector3>? | scales | Instance scales |
int | primitiveNumeration | Primitives are numerated per Node, starting with 0 |