ドキュメント

Unity Engine

Unity Engine

HasVertexAttribute(VertexAttribute)

Checks if a given vertex attribute exists in the MeshData.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public bool HasVertexAttribute(VertexAttribute attr)

Parameters

The vertex attribute to check for.

Returns

Type

Description

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

Remarks

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. Additional Resources: Mesh.HasVertexAttribute, GetVertexAttributeDimension, GetVertexAttributeFormat, Mesh.AcquireReadOnlyMeshData.