Class ARFace
Represents a face detected by an AR device.
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Syntax
public sealed class ARFace : ARTrackable<XRFace, ARFace>
Remarks
Generated by the ARFaceManager when an AR device detects a face in the environment.
Properties
indices
The indices defining the triangles of the face mesh. Check for existence with indices.IsCreated
.
The are three times as many indices as triangles, so this will always be a multiple of 3.
Declaration
public NativeArray<int> indices { get; }
Property Value
Type | Description |
---|---|
NativeArray<Int32> |
normals
The normals representing the face mesh. Check for existence with normals.IsCreated
.
This array is parallel to vertices and uvs.
Declaration
public NativeArray<Vector3> normals { get; }
Property Value
Type | Description |
---|---|
NativeArray<Vector3> |
uvs
The texture coordinates representing the face mesh. Check for existence with uvs.IsCreated
.
This array is parallel to vertices and normals.
Declaration
public NativeArray<Vector2> uvs { get; }
Property Value
Type | Description |
---|---|
NativeArray<Vector2> |
vertices
The vertices representing the face mesh. Check for existence with vertices.IsCreated
.
This array is parallel to normals and uvs. Vertices are
provided in face space, that is, relative to this ARFace's local
position and rotation.
Declaration
public NativeArray<Vector3> vertices { get; }
Property Value
Type | Description |
---|---|
NativeArray<Vector3> |
Events
updated
Invoked when the face is updated. If face meshes are supported, there will be updated vertices, normals, indices, and uvs.
Declaration
public event Action<ARFaceUpdatedEventArgs> updated
Event Type
Type | Description |
---|---|
Action<ARFaceUpdatedEventArgs> |