Version: 2020.3

Mesh.GetVertexAttributeDimension

매뉴얼로 전환
public int GetVertexAttributeDimension (Rendering.VertexAttribute attr);

파라미터

attr Vertex data attribute to check for.

반환

int Dimensionality of the data attribute, or zero if it is not present.

설명

Get dimension of a specific vertex data attribute on this Mesh.

Meshes usually use a known format for data layout, for example, a position is always a 3-component Vector, and a tangent is always a 4-component Vector. But, in some cases (usually regarding texture coordinates), the data layout can be of different dimensionality. For example, SetUVs accepts either a 2D, 3D or 4D texture coordinates. You can use this function to query this layout.

See Also: VertexAttribute, HasVertexAttribute, GetVertexAttributeFormat, GetVertexAttributes.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961