SimulatedEyeGazeDevice Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A simulated eye gaze device patterned after the Unity OpenXR Plugin EyeGazeDevice.
[UnityEngine.InputSystem.Layouts.InputControlLayout(displayName="Eye Gaze (MRTK)", isGenericTypeOfDevice=false)]
[UnityEngine.Scripting.Preserve]
public class SimulatedEyeGazeDevice : UnityEngine.InputSystem.InputDevice
[<UnityEngine.InputSystem.Layouts.InputControlLayout(displayName="Eye Gaze (MRTK)", isGenericTypeOfDevice=false)>]
[<UnityEngine.Scripting.Preserve>]
type SimulatedEyeGazeDevice = class
inherit InputDevice
Public Class SimulatedEyeGazeDevice
Inherits InputDevice
- Inheritance
-
UnityEngine.InputSystem.InputDeviceSimulatedEyeGazeDevice
- Attributes
-
UnityEngine.InputSystem.Layouts.InputControlLayoutAttribute UnityEngine.Scripting.PreserveAttribute
This eye device is not completely identical in terms of usages or features compared to the OpenXR eye device, but it is a close approximation. Bind to this device with the usage wildcards; for example, */{gaze}/position
and *{gaze}/rotation
. These usage bindings will also match any OpenXR compliant device in the real-world.
It's desirable to simply derive from the official OpenXR eye gaze device. However, this class uses a custom PoseControl type, instead of the version found in the Unity input system package, UnityEngine.InputSystem.XR.PoseControl. Also, the OpenXR plugin package does not ship a corresponding UnityEngine.InputSystem.XR.PoseState struct along with its own PoseControl type, as such cannot be injected to simulated input data into that control from the managed layer.
When the duplicated PoseControl type is either removed, or receives a corresponding state struct, this can inherit directly from the Unity's EyeGazeDevice.
pose |
A UnityEngine.InputSystem.XR.PoseControl representing the |
Finish |
UnityEngine.InputSystem.InputDevice.FinishSetup |
Termék | Verziók |
---|---|
MRTK3 Input | 3.0, 3.1, 3.2 |