Class FaceLandmarksAction
Inherited Members
Namespace: Unity.MARS.Landmarks
Assembly: Unity.MARS.dll
Syntax
[HelpURL("https://docs.unity3d.com/Packages/com.unity.mars@2.0/manual/ReferenceGuideActions.html#face-landmarks-action-facelandmarksaction")]
[MonoBehaviourComponentMenu(typeof(FaceLandmarksAction), "Action/Face Landmarks")]
[MovedFrom("Unity.MARS")]
public class FaceLandmarksAction : MonoBehaviour, IUsesCameraOffset, IFunctionalitySubscriber<IProvidesCameraOffset>, IFunctionalitySubscriber, IUsesMARSTrackableData<IMRFace>, ICalculateLandmarks, ISpawnable, IMatchAcquireHandler, IMatchUpdateHandler, IMatchLossHandler, IAction, ISimulatable
Properties
AvailableLandmarkDefinitions
A list of landmark definitions that this class can support.
Declaration
public List<LandmarkDefinition> AvailableLandmarkDefinitions { get; }
Property Value
| Type | Description |
|---|---|
| List<LandmarkDefinition> |
Methods
GetLandmarkCalculation(LandmarkDefinition)
Get an action that calculates a landmark with the given definition. If the landmark does not have the proper settings or output set up, it should return null
Declaration
public Action<ILandmarkController> GetLandmarkCalculation(LandmarkDefinition definition)
Parameters
| Type | Name | Description |
|---|---|---|
| LandmarkDefinition | definition | The landmark definition to get the calculation for |
Returns
| Type | Description |
|---|---|
| Action<ILandmarkController> |
OnMatchAcquire(QueryResult)
Called when a query match has been found
Declaration
public void OnMatchAcquire(QueryResult queryResult)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryResult | queryResult | Data associated with this event |
OnMatchDataChanged(QueryResult)
Declaration
protected void OnMatchDataChanged(QueryResult queryResult)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryResult | queryResult |
OnMatchDataLost(QueryResult)
Declaration
protected void OnMatchDataLost(QueryResult queryResult)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryResult | queryResult |
OnMatchLoss(QueryResult)
Called when a query match has been lost
Declaration
public void OnMatchLoss(QueryResult queryResult)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryResult | queryResult | Data associated with this event |
OnMatchUpdate(QueryResult)
Called when a query match's data has updated
Declaration
public void OnMatchUpdate(QueryResult queryResult)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryResult | queryResult | Data associated with this event |
SetupLandmark(ILandmarkController)
Called when a landmark is set to reference this source, or when the definition is changed. The source can use this to set the default starting properties and location for the landmark.
Declaration
public void SetupLandmark(ILandmarkController landmark)
Parameters
| Type | Name | Description |
|---|---|---|
| ILandmarkController | landmark | The landmark to setup. |
Events
dataChanged
This event can be invoked by the landmark source to indicate the source data has changed. By default, landmarks referencing this source will subscribe to this event and update.
Declaration
public event Action<ICalculateLandmarks> dataChanged
Event Type
| Type | Description |
|---|---|
| Action<ICalculateLandmarks> |