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: solution.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
OnInstanceCreate(ulong)
Called after xrCreateInstance.
Declaration
protected override bool OnInstanceCreate(ulong instance)
Parameters
Type | Name | Description |
---|---|---|
ulong | instance |
Returns
Type | Description |
---|---|
bool |
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()