Static Public Member Functions | |
static void | Setup () |
DEPRECATED: Use the InControlManager component instead. More... | |
static void | Reset () |
DEPRECATED: Use the InControlManager component instead. More... | |
static void | Update () |
DEPRECATED: Use the InControlManager component instead. More... | |
static void | Reload () |
Force the input manager to reset and setup. More... | |
static void | ClearInputState () |
Clears the state of input on all controls. The net result here should be that the state on all controls will return zero/false for the remainder of the current tick, and during the next update tick WasPressed, WasReleased, WasRepeated and HasChanged will return false. More... | |
static void | AddDeviceManager (InputDeviceManager deviceManager) |
Adds a device manager. Only one instance of a given type can be added. An error will be raised if you try to add more than one. More... | |
static void | AddDeviceManager< T > () |
Adds a device manager by type. More... | |
static T | GetDeviceManager< T > () |
Get a device manager from the input manager by type if it one is present. More... | |
static bool | HasDeviceManager< T > () |
Query whether a device manager is present by type. More... | |
static void | AttachDevice (InputDevice inputDevice) |
Attach a device to the input manager. More... | |
static void | DetachDevice (InputDevice inputDevice) |
Detach a device from the input manager. More... | |
static void | HideDevicesWithProfile (Type type) |
Hides the devices with a given profile. This must be called before the input manager is initialized. More... | |
Static Public Attributes | |
static readonly VersionInfo | Version = VersionInfo.InControlVersion() |
static ReadOnlyCollection< InputDevice > | Devices |
A readonly collection of devices. Not every device in this list is guaranteed to be attached or even a controller. This collection should be treated as a pool from which devices may be selected. The collection is in no particular order and the order may change at any time. Do not treat this collection as a list of players. More... | |
Properties | |
static bool | CommandWasPressed [get] |
Query whether a command button was pressed on any device during the last frame of input. More... | |
static bool | InvertYAxis [get, set] |
Gets or sets a value indicating whether the Y axis should be inverted for two-axis (directional) controls. When false (default), the Y axis will be positive up, the same as Unity. More... | |
static bool | IsSetup [get] |
Gets a value indicating whether the InputManager is currently setup and running. More... | |
static bool | MenuWasPressed [get] |
static bool | AnyKeyIsPressed [get] |
Detects whether any (keyboard) key is currently pressed. For more flexibility, see KeyCombo.Detect() More... | |
static InputDevice | ActiveDevice [get] |
Gets the currently active device if present, otherwise returns a null device which does nothing. The currently active device is defined as the last device that provided input events. This is a good way to query for a device in single player applications. More... | |
static bool | Enabled [get, set] |
Toggle whether input is processed or not. While disabled, all controls will return zero state. More... | |
static bool | SuspendInBackground [get, set] |
Suspend input updates when the application loses focus. When enabled and the app loses focus, input will be cleared and no. input updates will be processed. Input updates will resume when the app regains focus. More... | |
static bool | EnableNativeInput [get, set] |
Enable Native Input support. When enabled on initialization, the input manager will first check whether Native Input is supported on this platform and if so, it will add a NativeInputDeviceManager. More... | |
static bool | EnableXInput [get, set] |
Enable XInput support (Windows only). When enabled on initialization, the input manager will first check whether XInput is supported on this platform and if so, it will add an XInputDeviceManager. More... | |
static uint | XInputUpdateRate [get, set] |
Set the XInput background thread polling rate. When set to zero (default) it will equal the projects fixed updated rate. More... | |
static uint | XInputBufferSize [get, set] |
Set the XInput buffer size. (Experimental) Usually you want this to be zero (default). Setting it higher will introduce latency, but may smooth out input if querying input on FixedUpdate, which tends to cluster calls at the end of a frame. More... | |
static bool | NativeInputEnableXInput [get, set] |
Set Native Input on Windows to use XInput. When set to true (default), XInput will be utilized which better supports compatible controllers (such as Xbox 360 and Xbox One gamepads) including vibration control and proper separated triggers, but limits the number of these controllers to four. Additional XInput-compatible beyond four controllers will be ignored. DirectInput will be used for all non-XInput-compatible controllers. More... | |
static bool | NativeInputPreventSleep [get, set] |
Set Native Input to prevent system sleep and screensaver. Controller input generally does not prevent the system idle timer and the screensaver may come on during extended gameplay. When set to true, this will be prevented. More... | |
static uint | NativeInputUpdateRate [get, set] |
Set the Native Input background thread polling rate. When set to zero (default) it will equal the project's fixed update rate. More... | |
static bool | EnableICade [get, set] |
Enable iCade support (iOS only). When enabled on initialization, the input manager will first check whether XInput is supported on this platform and if so, it will add an XInputDeviceManager. More... | |
Events | |
static Action | OnSetup |
static Action< ulong, float > | OnUpdate |
static Action | OnReset |
static Action< InputDevice > | OnDeviceAttached |
static Action< InputDevice > | OnDeviceDetached |
static Action< InputDevice > | OnActiveDeviceChanged |
|
static |
Adds a device manager. Only one instance of a given type can be added. An error will be raised if you try to add more than one.
deviceManager | The device manager to add. |
|
static |
Adds a device manager by type.
T | A subclass of InputDeviceManager. |
T | : | InputDeviceManager | |
T | : | new() |
|
static |
Attach a device to the input manager.
inputDevice | The input device to attach. |
|
static |
Clears the state of input on all controls. The net result here should be that the state on all controls will return zero/false for the remainder of the current tick, and during the next update tick WasPressed, WasReleased, WasRepeated and HasChanged will return false.
|
static |
Detach a device from the input manager.
inputDevice | The input device to attach. |
|
static |
Get a device manager from the input manager by type if it one is present.
T | A subclass of InputDeviceManager. |
T | : | InputDeviceManager |
|
static |
Query whether a device manager is present by type.
T | A subclass of InputDeviceManager. |
T | : | InputDeviceManager |
|
static |
Hides the devices with a given profile. This must be called before the input manager is initialized.
type | Type. |
|
static |
Force the input manager to reset and setup.
|
static |
DEPRECATED: Use the InControlManager component instead.
|
static |
DEPRECATED: Use the InControlManager component instead.
|
static |
DEPRECATED: Use the InControlManager component instead.
|
static |
A readonly collection of devices. Not every device in this list is guaranteed to be attached or even a controller. This collection should be treated as a pool from which devices may be selected. The collection is in no particular order and the order may change at any time. Do not treat this collection as a list of players.
|
staticget |
Gets the currently active device if present, otherwise returns a null device which does nothing. The currently active device is defined as the last device that provided input events. This is a good way to query for a device in single player applications.
|
staticget |
Detects whether any (keyboard) key is currently pressed. For more flexibility, see KeyCombo.Detect()
|
staticget |
Query whether a command button was pressed on any device during the last frame of input.
|
staticgetset |
Toggle whether input is processed or not. While disabled, all controls will return zero state.
|
staticgetset |
Enable iCade support (iOS only). When enabled on initialization, the input manager will first check whether XInput is supported on this platform and if so, it will add an XInputDeviceManager.
|
staticgetset |
Enable Native Input support. When enabled on initialization, the input manager will first check whether Native Input is supported on this platform and if so, it will add a NativeInputDeviceManager.
|
staticgetset |
Enable XInput support (Windows only). When enabled on initialization, the input manager will first check whether XInput is supported on this platform and if so, it will add an XInputDeviceManager.
|
staticgetset |
Gets or sets a value indicating whether the Y axis should be inverted for two-axis (directional) controls. When false (default), the Y axis will be positive up, the same as Unity.
|
staticget |
Gets a value indicating whether the InputManager is currently setup and running.
|
staticgetset |
Set Native Input on Windows to use XInput. When set to true (default), XInput will be utilized which better supports compatible controllers (such as Xbox 360 and Xbox One gamepads) including vibration control and proper separated triggers, but limits the number of these controllers to four. Additional XInput-compatible beyond four controllers will be ignored. DirectInput will be used for all non-XInput-compatible controllers.
|
staticgetset |
Set Native Input to prevent system sleep and screensaver. Controller input generally does not prevent the system idle timer and the screensaver may come on during extended gameplay. When set to true, this will be prevented.
|
staticgetset |
Set the Native Input background thread polling rate. When set to zero (default) it will equal the project's fixed update rate.
|
staticgetset |
Suspend input updates when the application loses focus. When enabled and the app loses focus, input will be cleared and no. input updates will be processed. Input updates will resume when the app regains focus.
|
staticgetset |
Set the XInput buffer size. (Experimental) Usually you want this to be zero (default). Setting it higher will introduce latency, but may smooth out input if querying input on FixedUpdate, which tends to cluster calls at the end of a frame.
|
staticgetset |
Set the XInput background thread polling rate. When set to zero (default) it will equal the projects fixed updated rate.