Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AllocateTempMesh(int, int, out NativeSlice<Vertex>, out NativeSlice<ushort>)

Allocates the specified number of vertices and indices from a temporary allocator.
Read time 1 minuteLast updated 12 days ago

Definition

AllocateTempMesh(int, int, NativeSlice<Vertex>, NativeSlice<ushort>)

public void AllocateTempMesh(int vertexCount, int indexCount, out NativeSlice<Vertex> vertices, out NativeSlice<ushort> indices)

Parameters

vertexCount

The number of vertices to allocate. The maximum is 65535 (or UInt16.MaxValue).

indexCount

The number of triangle list indices to allocate. Each 3 indices represent one triangle, so this value should be multiples of 3.

The returned vertices.

The returned indices.

Remarks

You can only call this method during the mesh generation phase of the panel and shouldn't use it beyond.