Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AllocateUIMesh(ExtraVertexChannels, int, int, out UIMesh)

Allocates a fresh temporary UIMesh sized for vertexCount vertices and indexCount indices, with slices for the requested extras channels.
Read time 1 minuteLast updated 13 days ago

Definition

AllocateUIMesh(ExtraVertexChannels, int, int, UIMesh)

public void AllocateUIMesh(ExtraVertexChannels channels, int vertexCount, int indexCount, out UIMesh mesh)

Parameters


vertexCount


indexCount


mesh

Remarks

Channels not requested return as empty slices on the resulting UIMesh. Use the result as input to DrawData.SetMesh for tessellation refinement or wholesale geometry replacement. Memory is valid for the duration of this callback and any jobs added via MeshModificationContext.AddMeshModificationJob.
Requested channels that are NOT enabled on the panel's ExtraVertexChannels mask are dropped and the resulting
UIMesh
returns empty slices for those channels. Check slice lengths before filling.