SetIndexBufferParams(int, IndexFormat)
Sets the index buffer size and format of the Mesh that Unity creates from the MeshData.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public void SetIndexBufferParams(int indexCount, IndexFormat format)
Parameters
Remarks
Use this method to set the index buffer size and format for the Mesh that Unity creates from the struct. For details, see Mesh.SetIndexBufferParams.
MeshDataAfter you have set the index buffer parameters, you can write the indices into the array returned by Mesh.MeshData.GetIndexData. If you call this method on a read-only , Unity throws an exception.
MeshDataAdditional Resources: Mesh.AllocateWritableMeshData, Mesh.AcquireReadOnlyMeshData.