public static void SendHapticImpulse(InputDevice controller, uint channel, float amplitude, float duration = 1) { UnityEngine.InputSystem.Utilities.InternedString hand = GlobalState.Instance.settings.rightHanded ? UnityEngine.InputSystem.CommonUsages.RightHand : UnityEngine.InputSystem.CommonUsages.LeftHand; XRController dev = UnityEngine.InputSystem.InputSystem.GetDevice <XRController>(hand); var command = UnityEngine.InputSystem.XR.Haptics.SendHapticImpulseCommand.Create(1, amplitude, duration); dev.ExecuteCommand(ref command); }