docs.unity3d.com
    Show / Hide Table of Contents

    Class ARFaceManager

    Creates, updates, and removes GameObjects with ARFace components under the ARSessionOrigin's trackablesParent.

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>
    ARFaceManager
    Inherited Members
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.trackables
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.SetTrackablesActive(Boolean)
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.sessionOrigin
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.gameObjectName
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.GetPrefab()
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.m_Trackables
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.m_PendingAdds
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.Awake()
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.OnEnable()
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.OnDisable()
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.CanBeAddedToSubsystem(ARFace)
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.Update()
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.OnTrackablesChanged(List<ARFace>, List<ARFace>, List<ARFace>)
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.OnCreateTrackable(ARFace)
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.OnAfterSetSessionRelativeData(ARFace, XRFace)
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.CreateTrackableImmediate(XRFace)
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.DestroyPendingTrackable(TrackableId)
    ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>.CreateTrackableFromExisting(ARFace, XRFace)
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.subsystem
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.descriptor
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.GetActiveSubsystemInstance()
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.EnsureSubsystemInstanceSet()
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.OnEnable()
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.OnDisable()
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.OnDestroy()
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.OnBeforeStart()
    SubsystemLifecycleManager<XRFaceSubsystem, XRFaceSubsystemDescriptor>.OnAfterStart()
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: UnityEngine.XR.ARFoundation
    Syntax
    [RequireComponent(typeof(ARSessionOrigin))]
    [DisallowMultipleComponent]
    [DefaultExecutionOrder(-2147483647)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.1/api/UnityEngine.XR.ARFoundation.ARFaceManager.html")]
    public sealed class ARFaceManager : ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFace, ARFace>
    Remarks

    When enabled, this component subscribes to facesChanged event to update face data. If this component is disabled, and there are no other subscribers to those events, face detection will be disabled on the device.

    Properties

    currentMaximumFaceCount

    Get the maximum number of faces to track simultaneously.

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

    facePrefab

    Getter/setter for the Face Prefab.

    Declaration
    public GameObject facePrefab { get; set; }
    Property Value
    Type Description
    GameObject

    gameObjectName

    The name assigned to each GameObject belonging to each ARFace.

    Declaration
    protected override string gameObjectName { get; }
    Property Value
    Type Description
    String
    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRFaceSubsystem, UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRFace, UnityEngine.XR.ARFoundation.ARFace>.gameObjectName

    maximumFaceCount

    Get or set the maximum number of faces to track simultaneously. This method is obsolete. Use currentMaximumFaceCount or requestedMaximumFaceCount instead.

    Declaration
    [Obsolete("Use requestedMaximumFaceCount or currentMaximumFaceCount instead. (2020-01-14)")]
    public int maximumFaceCount { get; set; }
    Property Value
    Type Description
    Int32

    requestedMaximumFaceCount

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

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

    supportedFaceCount

    Get the supported number of faces that can be tracked simultaneously. This value may change when the configuration changes.

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

    Methods

    GetPrefab()

    Get the prefab that will be instantiated for each ARFace. May be null.

    Declaration
    protected override GameObject GetPrefab()
    Returns
    Type Description
    GameObject

    The prefab that will be instantiated for each ARFace.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRFaceSubsystem, UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRFace, UnityEngine.XR.ARFoundation.ARFace>.GetPrefab()

    OnAfterSetSessionRelativeData(ARFace, XRFace)

    Invoked just after a ARFace has been updated.

    Declaration
    protected override void OnAfterSetSessionRelativeData(ARFace face, XRFace sessionRelativeData)
    Parameters
    Type Name Description
    ARFace face
    XRFace sessionRelativeData
    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRFaceSubsystem, UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRFace, UnityEngine.XR.ARFoundation.ARFace>.OnAfterSetSessionRelativeData(UnityEngine.XR.ARFoundation.ARFace, UnityEngine.XR.ARSubsystems.XRFace)

    OnBeforeStart()

    Invoked just before calling Start on the Subsystem. Used to set the requestedMaximumFaceCount on the subsystem.

    Declaration
    protected override void OnBeforeStart()
    Overrides
    UnityEngine.XR.ARFoundation.SubsystemLifecycleManager<UnityEngine.XR.ARSubsystems.XRFaceSubsystem, UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor>.OnBeforeStart()

    OnTrackablesChanged(List<ARFace>, List<ARFace>, List<ARFace>)

    Invoked when the base class detects trackable changes.

    Declaration
    protected override void OnTrackablesChanged(List<ARFace> added, List<ARFace> updated, List<ARFace> removed)
    Parameters
    Type Name Description
    List<ARFace> added

    The list of added ARFaces.

    List<ARFace> updated

    The list of updated ARFaces.

    List<ARFace> removed

    The list of removed ARFaces.

    Overrides
    UnityEngine.XR.ARFoundation.ARTrackableManager<UnityEngine.XR.ARSubsystems.XRFaceSubsystem, UnityEngine.XR.ARSubsystems.XRFaceSubsystemDescriptor, UnityEngine.XR.ARSubsystems.XRFace, UnityEngine.XR.ARFoundation.ARFace>.OnTrackablesChanged(System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARFace>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARFace>, System.Collections.Generic.List<UnityEngine.XR.ARFoundation.ARFace>)

    TryGetFace(TrackableId)

    Attempts to retrieve an ARFace.

    Declaration
    public ARFace TryGetFace(TrackableId faceId)
    Parameters
    Type Name Description
    TrackableId faceId

    The TrackableId associated with the ARFace.

    Returns
    Type Description
    ARFace

    The ARFaceif found. null otherwise.

    Events

    facesChanged

    Raised for each new ARFace detected in the environment.

    Declaration
    public event Action<ARFacesChangedEventArgs> facesChanged
    Event Type
    Type Description
    Action<ARFacesChangedEventArgs>
    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