Class XRFaceSubsystem | AR Subsystems | 3.1.10
docs.unity3d.com
    Show / Hide Table of Contents

    Class XRFaceSubsystem

    An abstract class that provides a generic API for low-level face tracking features.

    Inheritance
    Object
    Subsystem
    Subsystem<XRFaceSubsystemDescriptor>
    XRSubsystem<XRFaceSubsystemDescriptor>
    TrackingSubsystem<XRFace, XRFaceSubsystemDescriptor>
    XRFaceSubsystem
    Inherited Members
    TrackingSubsystem<XRFace, XRFaceSubsystemDescriptor>.GetChanges(Allocator)
    XRSubsystem<XRFaceSubsystemDescriptor>.running
    XRSubsystem<XRFaceSubsystemDescriptor>.Destroy()
    XRSubsystem<XRFaceSubsystemDescriptor>.Start()
    XRSubsystem<XRFaceSubsystemDescriptor>.Stop()
    Subsystem<XRFaceSubsystemDescriptor>.SubsystemDescriptor
    Subsystem.OnDestroy()
    Namespace: UnityEngine.XR.ARSubsystems
    Syntax
    public abstract class XRFaceSubsystem : TrackingSubsystem<XRFace, XRFaceSubsystemDescriptor>, ISubsystem
    Remarks

    This class can be used to access face tracking features in your app via accessing the generic API. It can also be extended to provide an implementation of a provider which provides the face tracking data to the higher level code.

    Constructors

    XRFaceSubsystem()

    Constructs a face subsystem. Do not invoked directly; call Create on the XRFaceSubsystemDescriptor instead.

    Declaration
    public XRFaceSubsystem()

    Properties

    maximumFaceCount

    Get or set the maximum number of faces to track simultaneously.

    Declaration
    public int maximumFaceCount { get; set; }
    Property Value
    Type Description
    Int32

    supportedFaceCount

    Get the number of faces the subsystem is able to track simultaneously.

    Declaration
    public int supportedFaceCount { get; }
    Property Value
    Type Description
    Int32

    Methods

    CreateProvider()

    Creates an instance of an implementation-specific .

    Declaration
    protected abstract XRFaceSubsystem.Provider CreateProvider()
    Returns
    Type Description
    XRFaceSubsystem.Provider

    An implementation of the class.

    GetChanges(Allocator)

    Get the changes (added, updated, and removed) faces since the last call to GetChanges(Allocator).

    Declaration
    public override TrackableChanges<XRFace> GetChanges(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    An Allocator to use when allocating the returned NativeArrays.

    Returns
    Type Description
    TrackableChanges<XRFace>

    TrackableChanges<T> describing the faces that have been added, updated, and removed since the last call to GetChanges(Allocator). The caller owns the memory allocated with Allocator.

    Overrides
    UnityEngine.XR.ARSubsystems.TrackingSubsystem<UnityEngine.XR.ARSubsystems.XRFace, UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor>.GetChanges(Unity.Collections.Allocator)

    GetFaceMesh(TrackableId, Allocator, ref XRFaceMesh)

    Declaration
    public virtual void GetFaceMesh(TrackableId faceId, Allocator allocator, ref XRFaceMesh faceMesh)
    Parameters
    Type Name Description
    TrackableId faceId
    Allocator allocator
    XRFaceMesh faceMesh

    OnDestroyed()

    Destroy the face subsystem.

    Declaration
    protected override sealed void OnDestroyed()
    Overrides
    UnityEngine.XR.ARSubsystems.XRSubsystem<UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor>.OnDestroyed()

    OnStart()

    Start the face subsystem, i.e., start tracking faces.

    Declaration
    protected override sealed void OnStart()
    Overrides
    UnityEngine.XR.ARSubsystems.XRSubsystem<UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor>.OnStart()

    OnStop()

    Stop the subsystem, i.e., stop tracking faces.

    Declaration
    protected override sealed void OnStop()
    Overrides
    UnityEngine.XR.ARSubsystems.XRSubsystem<UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor>.OnStop()
    Back to top
    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