A game about forced loneliness, made by TACStudios
at master 34 lines 1.4 kB view raw
1using UnityEngine.InputSystem.Controls; 2using UnityEngine.InputSystem.Layouts; 3using UnityEngine.Scripting; 4 5namespace UnityEngine.InputSystem 6{ 7 /// <summary> 8 /// An input device that has its orientation and position in space tracked. 9 /// </summary> 10 /// <seealso cref="UnityEngine.InputSystem.XR.XRController"/> 11 /// <seealso cref="UnityEngine.InputSystem.XR.XRHMD"/> 12 [InputControlLayout(displayName = "Tracked Device", isGenericTypeOfDevice = true)] 13 public class TrackedDevice : InputDevice 14 { 15 [InputControl(synthetic = true)] 16 public IntegerControl trackingState { get; protected set; } 17 [InputControl(synthetic = true)] 18 public ButtonControl isTracked { get; protected set; } 19 [InputControl(noisy = true, dontReset = true)] 20 public Vector3Control devicePosition { get; protected set; } 21 [InputControl(noisy = true, dontReset = true)] 22 public QuaternionControl deviceRotation { get; protected set; } 23 24 protected override void FinishSetup() 25 { 26 base.FinishSetup(); 27 28 trackingState = GetChildControl<IntegerControl>("trackingState"); 29 isTracked = GetChildControl<ButtonControl>("isTracked"); 30 devicePosition = GetChildControl<Vector3Control>("devicePosition"); 31 deviceRotation = GetChildControl<QuaternionControl>("deviceRotation"); 32 } 33 } 34}