Class XRFaceSubsystem
An abstract class that provides a generic API for low-level face tracking features.
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public abstract class XRFaceSubsystem : TrackingSubsystem<XRFace, XRFaceSubsystemDescriptor>
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 | 
supported
Returns true if face tracking is supported.
Declaration
public bool supported { get; }
Property Value
| Type | Description | 
|---|---|
| Boolean | 
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 XRFaceSubsystem.IProvider.
Declaration
protected abstract XRFaceSubsystem.IProvider CreateProvider()
Returns
| Type | Description | 
|---|---|
| XRFaceSubsystem.IProvider | An implementation of the XRFaceSubsystem.IProvider class.  | 
Destroy()
Destroy the face subsystem.
Declaration
public override sealed void Destroy()
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   | 
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   | 
Overrides
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 | 
Start()
Start the face subsystem, i.e., start tracking faces.
Declaration
public override void Start()
Stop()
Stop the subsystem, i.e., stop tracking faces.
Declaration
public override void Stop()