Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


SimulatedEyeGazeDevice Class

Definition

A simulated eye gaze device patterned after the Unity OpenXR Plugin EyeGazeDevice.

C#
[UnityEngine.InputSystem.Layouts.InputControlLayout(displayName="Eye Gaze (MRTK)", isGenericTypeOfDevice=false)]
[UnityEngine.Scripting.Preserve]
public class SimulatedEyeGazeDevice : UnityEngine.InputSystem.InputDevice
Inheritance
UnityEngine.InputSystem.InputDevice
SimulatedEyeGazeDevice
Attributes
UnityEngine.InputSystem.Layouts.InputControlLayoutAttribute UnityEngine.Scripting.PreserveAttribute

Remarks

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.

Constructors

Properties

pose

A UnityEngine.InputSystem.XR.PoseControl representing the EyeGazeInteraction.pose OpenXR binding.

Methods

FinishSetup() UnityEngine.InputSystem.InputDevice.FinishSetup

Applies to

Termék Verziók
MRTK3 Input 3.0, 3.1, 3.2