docs.unity3d.com
    Show / Hide Table of Contents

    Class ARFace

    Represents a face detected by an AR device.

    Inheritance
    Object
    ARTrackable<XRFace, ARFace>
    ARFace
    Inherited Members
    ARTrackable<XRFace, ARFace>.destroyOnRemoval
    ARTrackable<XRFace, ARFace>.trackableId
    ARTrackable<XRFace, ARFace>.trackingState
    ARTrackable<XRFace, ARFace>.pending
    ARTrackable<XRFace, ARFace>.sessionRelativeData
    ARTrackable<XRFace, ARFace>.OnAfterSetSessionRelativeData()
    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>
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023