Class EyeGazeInteraction
This OpenXRInteractionFeature enables the use of eye gaze interaction profiles in OpenXR. It enables XR_EXT_eye_gaze_interaction in the underlying runtime. This creates a new InputDevice with the EyeTracking characteristic. This new device has both gazePosition and gazeRotation input features, as well as isTracked and trackingState usages to determine if the gaze is available.
Inheritance
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Interactions
Assembly: Unity.XR.OpenXR.dll
Syntax
public class EyeGazeInteraction : OpenXRInteractionFeature
Fields
extensionString
The OpenXR Extension string. This is used by OpenXR to check if this extension is available or enabled. See eye gaze interaction extension documentation for more information on this OpenXR extension.
Declaration
public const string extensionString = "XR_EXT_eye_gaze_interaction"
Field Value
Type | Description |
---|---|
string |
featureId
The feature id string. This is used to give the feature a well known id for reference.
Declaration
public const string featureId = "com.unity.openxr.feature.input.eyetracking"
Field Value
Type | Description |
---|---|
string |
Methods
GetDeviceLayoutName()
Return device layer out string used for registering device EyeGaze in InputSystem.
Declaration
protected override string GetDeviceLayoutName()
Returns
Type | Description |
---|---|
string | Device layout string. |
Overrides
GetInteractionProfileType()
Return interaction profile type. EyeGaze profile is Device type.
Declaration
protected override OpenXRInteractionFeature.InteractionProfileType GetInteractionProfileType()
Returns
Type | Description |
---|---|
OpenXRInteractionFeature.InteractionProfileType | Interaction profile type. |
Overrides
GetValidationChecks(List<ValidationRule>, BuildTargetGroup)
Allows a feature to add to a list of validation rules which your feature will evaluate at build time. Details of the validation results can be found in OpenXRProjectValidation.
Declaration
protected override void GetValidationChecks(List<OpenXRFeature.ValidationRule> results, BuildTargetGroup target)
Parameters
Type | Name | Description |
---|---|---|
List<OpenXRFeature.ValidationRule> | results | |
BuildTargetGroup | target |
Overrides
OnInstanceCreate(ulong)
Called after xrCreateInstance.
Declaration
protected override bool OnInstanceCreate(ulong instance)
Parameters
Type | Name | Description |
---|---|---|
ulong | instance |
Returns
Type | Description |
---|---|
bool | Always returns true, as this is intended to be overridden. |
Overrides
RegisterActionMapsWithRuntime()
Register action maps for this device with the OpenXR Runtime. Called at runtime before Start.
Declaration
protected override void RegisterActionMapsWithRuntime()
Overrides
RegisterDeviceLayout()
Registers the EyeGazeInteraction.EyeGazeDevice layout with the Input System.
Declaration
protected override void RegisterDeviceLayout()
Overrides
UnregisterDeviceLayout()
Removes the EyeGazeInteraction.EyeGazeDevice layout from the Input System.
Declaration
protected override void UnregisterDeviceLayout()