MeshGenerationContext.AllocateTempMesh

声明

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

参数

vertexCount 要分配的顶点数。最大值为 65535(或 UInt16.MaxValue)。
indexCount 要分配的三角形列表索引数。每 3 个索引代表一个三角形,因此此值应为 3 的倍数。
vertices 返回的顶点。
indices 返回的索引。

描述

从临时分配器中分配指定数量的顶点和索引。

您只能在面板的网格生成阶段调用此方法,并且不应该在超出此阶段后使用它。


Did you find this page useful? Please give it a rating: