Method Resize
Resize(int, int, Attributes, Allocator)
Resize the NativeArray
s held by this struct. This method will deallocate
the NativeArray
s if they are not needed or if they are not the correct size.
If they are already the correct size, this method does not mutate those NativeArray
s.
This facilitate memory reuse when the number of vertices or triangles in the face does
not change frequently.
Declaration
public void Resize(int vertexCount, int triangleCount, XRFaceMesh.Attributes attributes, Allocator allocator)
Parameters
Type | Name | Description |
---|---|---|
int | vertexCount | The number of vertices in the mesh. |
int | triangleCount | The number of triangles in the mesh. |
XRFaceMesh.Attributes | attributes | Optional mesh attributes. This affects whether normals and uvs will be (re)allocated or disposed. |
Allocator | allocator | If a reallocation is required, this allocator will be used. |