InputSystem
static class in UnityEngine.InputSystem · Unity.InputSystem
The Input System's devices and updates. At the start of each frame deltas reset, the engine's keyboard and mouse read this frame's input, and events queued since the last update apply in order; after each, the enabled actions bound to the controls that changed run their callbacks. A device becomes current when it's added or sends input.
Properties 3
static ReadOnlyArray<InputDevice> devices { get; }static InputSettings settings { get; set; }static Version version { get; }Methods 19
static TDevice AddDevice<TDevice>(string? name = null)static InputDevice AddDevice(InputDevice device)static void AddDeviceUsage(InputDevice device, string usage)static void AddDeviceUsage(InputDevice device, InternedString usage)static void DisableDevice(InputDevice device, bool keepSendingEvents = false)static void EnableDevice(InputDevice device)static InputControl? FindControl(string path)static TDevice? GetDevice<TDevice>()static InputDevice? GetDevice(string nameOrLayout)static InputDevice? GetDeviceById(int deviceId)static void PauseHaptics()Pauses every device's haptics (motors stop, keeping their speeds).
static void QueueStateEvent<TState>(InputDevice device, TState state, double time = -1)static void RegisterBindingComposite<T>(string? name = null)static void RegisterBindingComposite(Type type, string? name)Registers a composite by name (its class name less "Composite" by default).
static void RegisterInteraction<T>(string? name = null)static void RegisterInteraction(Type type, string? name = null)Makes a custom interaction available by name (its class name without "Interaction" by default).
static void RemoveDevice(InputDevice device)static void RemoveDeviceUsage(InputDevice device, string usage)static void RemoveDeviceUsage(InputDevice device, InternedString usage)static void ResetHaptics()static void ResumeHaptics()static void SetDeviceUsage(InputDevice device, string? usage)static void SetDeviceUsage(InputDevice device, InternedString usage)Gives the device the one usage (none for null), as "LeftHand" makes an XR controller the left hand.
static Type? TryGetBindingComposite(string name)static Type? TryGetInteraction(string name)static void Update()Runs an update now: the frame's resets, the engine's input, then queued events.
Events 4
static event Action<object, InputActionChange>? onActionChangestatic event Action? onAfterUpdatestatic event Action? onBeforeUpdatestatic event Action<InputDevice, InputDeviceChange>? onDeviceChangeNot in Tassix yet 48
AddDeviceUsage DisableAllEnabledActions FindControls FlushDisconnectedDevices GetNameOfBaseLayout GetUnsupportedDevices HasNativeObject IsFirstLayoutBasedOnSecond ListEnabledActions ListInteractions ListLayouts ListLayoutsBasedOn ListProcessors LoadLayout PauseHaptics QueueConfigChangeEvent QueueDeltaStateEvent QueueEvent QueueTextEvent RegisterLayout RegisterLayoutBuilder RegisterLayoutMatcher RegisterLayoutOverride RegisterPrecompiledLayout RegisterProcessor RemoveDeviceUsage RemoveLayout ResetDevice ResetHaptics ResumeHaptics SetDeviceUsage TryFindMatchingLayout TryGetProcessor TrySyncDevice actions customBindingPathValidators disconnectedDevices metrics onActionsChange onAnyButtonPress onDeviceCommand onEvent onFindLayoutForDevice onLayoutChange onSettingsChange pollingFrequency remoting runInBackground