Version: 2022.3
言語: 日本語

Mesh.MeshData.GetVertexAttributeDimension

マニュアルに切り替える
public int GetVertexAttributeDimension (Rendering.VertexAttribute attr);

パラメーター

attr The vertex attribute to get the dimension of.

戻り値

int Returns the dimension of the vertex attribute. Returns 0 if the vertex attribute is not present.

説明

Gets the dimension of a given vertex attribute in the MeshData.

Most vertex attributes have a standard data layout. For example, a normal is a 3-component vector. Some vertex attributes (usually texture coordinates) have more than one possible data layout. For example, SetUVs accepts either 2 dimensional, 3 dimensional or 4 dimensional texture coordinates. You can use this function to query the layout of a given vertex attribute. See Also: HasVertexAttribute, GetVertexAttributeFormat.