Version: 2021.2

Mesh.MeshData.HasVertexAttribute

切换到手册
public bool HasVertexAttribute (Rendering.VertexAttribute attr);

参数

attr The vertex attribute to check for.

返回

bool Returns true if the data attribute is present in the Mesh. Returns false if it is not.

描述

Checks if a given vertex attribute exists in the MeshData.

Most Mesh vertex attributes are optional. For example, a Mesh might contain only vertex positions, normals, and one UV coordinate. Use this method to check whether a given vertex attribute is present in a Mesh. See Also: Mesh.HasVertexAttribute, GetVertexAttributeDimension, GetVertexAttributeFormat, Mesh.AcquireReadOnlyMeshData.