using UnityEngine.InputSystem.Controls; using UnityEngine.InputSystem.Layouts; using UnityEngine.Scripting; namespace UnityEngine.InputSystem { /// /// An input device that has its orientation and position in space tracked. /// /// /// [InputControlLayout(displayName = "Tracked Device", isGenericTypeOfDevice = true)] public class TrackedDevice : InputDevice { [InputControl(synthetic = true)] public IntegerControl trackingState { get; protected set; } [InputControl(synthetic = true)] public ButtonControl isTracked { get; protected set; } [InputControl(noisy = true, dontReset = true)] public Vector3Control devicePosition { get; protected set; } [InputControl(noisy = true, dontReset = true)] public QuaternionControl deviceRotation { get; protected set; } protected override void FinishSetup() { base.FinishSetup(); trackingState = GetChildControl("trackingState"); isTracked = GetChildControl("isTracked"); devicePosition = GetChildControl("devicePosition"); deviceRotation = GetChildControl("deviceRotation"); } } }