Class ARFaceManager
Creates, updates, and removes GameObject
s with ARFace components under the
ARSessionOrigin's trackablesParent.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.ARFoundation
Assembly: solution.dll
Syntax
[RequireComponent(typeof(ARSessionOrigin))]
[DisallowMultipleComponent]
[DefaultExecutionOrder(-2147483647)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARFaceManager.html")]
public sealed class ARFaceManager : ARTrackableManager<XRFaceSubsystem, XRFaceSubsystemDescriptor, XRFaceSubsystem.Provider, 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
Name | Description |
---|---|
currentMaximumFaceCount | Get the maximum number of faces to track simultaneously. |
facePrefab | Getter/setter for the Face Prefab. |
gameObjectName | The name assigned to each |
maximumFaceCount | Get or set the maximum number of faces to track simultaneously. This method is obsolete. Use currentMaximumFaceCount or requestedMaximumFaceCount instead. |
requestedMaximumFaceCount | Get or set the requested maximum number of faces to track simultaneously |
supportedFaceCount | Get the supported number of faces that can be tracked simultaneously. This value might change when the configuration changes. |
Methods
Name | Description |
---|---|
GetPrefab() | Get the Prefab that will be instantiated for each ARFace. Can be |
OnAfterSetSessionRelativeData(ARFace, XRFace) | Invoked just after a ARFace has been updated. |
OnBeforeStart() | Invoked just before calling |
OnTrackablesChanged(List<ARFace>, List<ARFace>, List<ARFace>) | Invoked when the base class detects trackable changes. |
TryGetFace(TrackableId) | Attempts to retrieve an ARFace. |
Events
Name | Description |
---|---|
facesChanged | Raised for each new ARFace detected in the environment. |