Class ScyllaInput
The Scylla Input module. Provides centralized input handling for keyboard, mouse, gamepad, touchscreen, joystick, and pen devices using Unity's Input System as the underlying transport layer.
Implements
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public sealed class ScyllaInput : ScyllaModule, IScyllaModule
Remarks
ScyllaInput is a Tier-1 Scylla.Core.Modules.ScyllaModule (priority 20)
that initializes before all feature and gameplay modules. It coordinates seven
specialized sub-managers whose instances are created during
OnInitialize and destroyed during OnShutdown:
-
BridgeManager - aggregates one or more
IScyllaInputBridgeimplementations and routes raw device queries to the active bridge. The default bridge wraps Unity's Input System. -
ActionManager - owns registered
InputActionAssetobjects and exposes action-level queries (pressed, performed this frame, float value, Vector2 value). - ContextManager - maintains a priority stack of InputContext objects that control which action maps are active and whether lower-priority contexts receive input.
- BindingManager - supports runtime interactive rebinding, binding persistence to JSON files or PlayerPrefs, and profile management.
- BufferManager - buffers recent action inputs for a configurable time window, useful for action games that need leniency around input timing (e.g., combo windows).
- ControlSchemeManager - auto-detects the active control scheme (keyboard/mouse vs. gamepad) based on recent device activity and fires control-scheme-change events via SEX.
- HintsManager - resolves human-readable or sprite-based button prompts from registered icon sets for the currently active control scheme.
The module exposes two parallel APIs for keyboard queries: methods that accept
Unity's UnityEngine.InputSystem.Key (e.g., IsKeyPressed(Key))
for callers that already depend on the Input System package, and
IsScyllaKey* equivalents (e.g., IsScyllaKeyPressed(ScyllaKey)) that
accept ScyllaKey for callers that wish to remain insulated from
that dependency.
All per-frame query methods return false / zero when input
processing is disabled (IsInputEnabled is false) or when
the module has not yet been initialized.
Structural lifecycle events (device connected/disconnected, input
enabled/disabled) are broadcast both to registered IInputListener
objects via RegisterListener(IInputListener) and to all SEX subscribers via the
corresponding InputDeviceConnectedEvent / InputDeviceDisconnectedEvent
/ InputEnabledEvent / InputDisabledEvent event types.
Properties
ActionManager
Gets the action manager that owns registered InputActionAsset objects
and exposes action-level queries such as pressed state, this-frame events, and
typed value reads. Returns null before initialization and after shutdown.
Declaration
public IInputActionManager ActionManager { get; }
Property Value
| Type | Description |
|---|---|
| IInputActionManager |
ActiveContext
Gets the InputContext that is currently at the top of the context
stack and therefore receiving input. Returns null when the stack is
empty or the context manager is not yet initialized.
Declaration
public InputContext ActiveContext { get; }
Property Value
| Type | Description |
|---|---|
| InputContext |
AnyKeyPressed
Gets a value indicating whether any keyboard key is currently held down.
Returns false when IsInputEnabled is false or the
bridge manager is not yet initialized.
Declaration
public bool AnyKeyPressed { get; }
Property Value
| Type | Description |
|---|---|
| bool |
BindingManager
Gets the binding manager that supports interactive runtime rebinding, binding
persistence (JSON file or PlayerPrefs), and per-action binding reset.
Returns null before initialization and after shutdown.
Declaration
public IInputBindingManager BindingManager { get; }
Property Value
| Type | Description |
|---|---|
| IInputBindingManager |
BridgeManager
Gets the bridge manager that aggregates one or more input bridges and routes
raw device queries (key state, mouse position, gamepad axes) to them.
Returns null before initialization and after shutdown.
Declaration
public IInputBridgeManager BridgeManager { get; }
Property Value
| Type | Description |
|---|---|
| IInputBridgeManager |
BufferManager
Gets the buffer manager that records recent action inputs within a configurable
time window, allowing action games to accept slightly late inputs (e.g., for
combo leniency). Returns null before initialization and after shutdown.
Declaration
public IInputBufferManager BufferManager { get; }
Property Value
| Type | Description |
|---|---|
| IInputBufferManager |
Configuration
Gets the active ScyllaInputConfiguration asset for this module.
Returns null when no configuration asset has been assigned in the
Inspector and none could be loaded from Resources.
Declaration
public ScyllaInputConfiguration Configuration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaInputConfiguration |
ContextConfiguration
Gets the ScyllaInputContextConfiguration asset that defines the
pre-configured input contexts for this project. May be null if neither
the Inspector field is assigned nor a matching asset exists in Resources;
in that case the module registers a set of built-in default contexts
(Gameplay, Menu, Console, Global) instead.
Declaration
public ScyllaInputContextConfiguration ContextConfiguration { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaInputContextConfiguration |
ContextManager
Gets the context manager that maintains the active InputContext
stack. Contexts control which action maps are enabled and whether lower-priority
contexts receive input. Returns null before initialization and after
shutdown.
Declaration
public IInputContextManager ContextManager { get; }
Property Value
| Type | Description |
|---|---|
| IInputContextManager |
ContextStackDepth
Gets the number of InputContext objects currently on the context
stack. Returns 0 when the stack is empty or the context manager is not
yet initialized.
Declaration
public int ContextStackDepth { get; }
Property Value
| Type | Description |
|---|---|
| int |
ControlSchemeManager
Gets the control scheme manager that automatically detects whether the player
is using a keyboard/mouse or a gamepad, and fires SEX events when the scheme
changes. Returns null before initialization and after shutdown.
Declaration
public IControlSchemeManager ControlSchemeManager { get; }
Property Value
| Type | Description |
|---|---|
| IControlSchemeManager |
HintsManager
Gets the hints manager that resolves human-readable or sprite-based button
prompts from registered icon sets for the currently active control scheme.
Returns null before initialization and after shutdown.
Declaration
public IInputHintsManager HintsManager { get; }
Property Value
| Type | Description |
|---|---|
| IInputHintsManager |
Info
Gets the static metadata descriptor for this module, including its unique ID, display name, version string, description, declared dependencies, and initialization priority.
Declaration
public override ScyllaModuleInfo Info { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaModuleInfo | A Scylla.Core.Modules.ScyllaModuleInfo instance that identifies this module to the framework. Must be implemented by every concrete module subclass and must remain constant for the lifetime of the component. |
Overrides
Instance
Gets the singleton instance of the ScyllaInput module.
Returns null if the module has not yet been awakened by the Scylla
bootstrap sequence or has already been destroyed.
Declaration
public static ScyllaInput Instance { get; }
Property Value
| Type | Description |
|---|---|
| ScyllaInput |
IsGamepadConnected
Gets a value indicating whether at least one gamepad is currently connected and recognized by the bridge. This check is independent of IsInputEnabled: a gamepad may be connected even while input processing is disabled.
Declaration
public bool IsGamepadConnected { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsInputEnabled
Gets whether input processing is currently active. When false, all
per-frame query methods on this module return false or
Vector2.zero without consulting the underlying bridges.
Declaration
public bool IsInputEnabled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsRebinding
Gets a value indicating whether an interactive rebind operation started via StartRebind(string, int) is currently waiting for user input. UI code should check this property to disable other input processing during rebinding.
Declaration
public bool IsRebinding { get; }
Property Value
| Type | Description |
|---|---|
| bool |
LastUsedDevice
Gets the Unity Input System InputDevice that most recently produced
input activity. Returns null before any input has been received or
after shutdown.
Declaration
public InputDevice LastUsedDevice { get; }
Property Value
| Type | Description |
|---|---|
| InputDevice |
LastUsedDeviceType
Gets the InputDeviceType category of LastUsedDevice. Returns Unknown when no device has been used or the bridge manager is not yet initialized.
Declaration
public InputDeviceType LastUsedDeviceType { get; }
Property Value
| Type | Description |
|---|---|
| InputDeviceType |
MouseDelta
Gets the mouse movement delta accumulated since the last frame.
Returns Vector2.zero when IsInputEnabled is false
or the bridge manager is not yet initialized.
Declaration
public Vector2 MouseDelta { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
MousePosition
Gets the current mouse position in screen-space pixel coordinates.
Returns Vector2.zero when IsInputEnabled is false
or the bridge manager is not yet initialized.
Declaration
public Vector2 MousePosition { get; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Methods
Awake()
Unity Awake callback. Sets the singleton Instance reference and
registers this module with the Scylla framework via base.Awake().
Declaration
protected override void Awake()
Overrides
DisableInput()
Disables input processing. All per-frame query methods will return false
or Vector2.zero until input is re-enabled. Notifies registered
IInputListener objects and publishes an InputDisabledEvent
via SEX. Does nothing if input is already disabled.
Declaration
public void DisableInput()
EnableInput()
Enables input processing if it is currently disabled. All per-frame query
methods will resume returning live values. Notifies registered
IInputListener objects and publishes an InputEnabledEvent
via SEX. Does nothing if input is already enabled.
Declaration
public void EnableInput()
GetAction(string)
Retrieves a registered ScyllaInputAction by its string ID.
Declaration
public ScyllaInputAction GetAction(string actionID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique identifier of the action as defined in the registered
|
Returns
| Type | Description |
|---|---|
| ScyllaInputAction | The matching ScyllaInputAction, or |
GetActionValue(string)
Gets the current scalar float value of the named action (e.g., an axis or a button's analog pressure value).
Declaration
public float GetActionValue(string actionID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique action identifier as registered with the action manager. |
Returns
| Type | Description |
|---|---|
| float | The float value read from the action's current state. Returns |
GetActionVector2(string)
Gets the current two-dimensional value of the named action (e.g., a stick or WASD composite binding).
Declaration
public Vector2 GetActionVector2(string actionID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique action identifier as registered with the action manager. |
Returns
| Type | Description |
|---|---|
| Vector2 | The |
GetBindingDisplayString(string, int)
Gets a human-readable display string for the current binding of the specified action, suitable for showing in UI button prompts.
Declaration
public string GetBindingDisplayString(string actionID, int bindingIndex = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique ID of the action whose binding display string to retrieve. |
| int | bindingIndex | Zero-based index of the binding within the action's binding list. Defaults to
|
Returns
| Type | Description |
|---|---|
| string | A string describing the current binding (e.g., |
GetConfiguration()
Returns the primary Scylla.Core.Config.ScyllaConfiguration asset for this module. Override in derived classes to expose the module's main configuration asset. For modules that declare multiple configuration slots this should return the most important or first-ranked configuration.
Declaration
public override ScyllaConfiguration GetConfiguration()
Returns
| Type | Description |
|---|---|
| ScyllaConfiguration | The module's primary Scylla.Core.Config.ScyllaConfiguration instance, or |
Overrides
Remarks
The base implementation always returns null. Modules with a single configuration
should override this to return their configuration field value. Modules with multiple
configurations should also override Scylla.Core.Modules.ScyllaModule.GetConfigurationTypes() and
Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames().
GetConfigurationFileName()
Returns the Resources-relative filename (without extension) used to auto-load
the primary configuration asset when no asset has been assigned in the Inspector.
Override in derived classes to specify a custom path inside a Resources folder.
Declaration
public override string GetConfigurationFileName()
Returns
| Type | Description |
|---|---|
| string | A |
Overrides
Remarks
This value feeds the single-configuration backward-compatibility path in Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames(). Modules that use multiple configurations should override Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames() directly and return one path per type.
GetConfigurationFileNames()
Returns the Resources-relative filenames (without extension) used to auto-load
each configuration asset declared by this module. Override in derived classes that
support multiple configurations. The order of the returned filenames must correspond
to the order of the types returned by Scylla.Core.Modules.ScyllaModule.GetConfigurationTypes().
Declaration
public override string[] GetConfigurationFileNames()
Returns
| Type | Description |
|---|---|
| string[] | An array of |
Overrides
Remarks
The base implementation wraps the single filename from Scylla.Core.Modules.ScyllaModule.GetConfigurationFileName() for backward compatibility with the single-configuration pattern. Modules declaring more than one configuration should override both this method and Scylla.Core.Modules.ScyllaModule.GetConfigurationTypes().
GetConfigurationType()
Returns the Type of the primary configuration expected by this module. Override in derived classes to declare the concrete Scylla.Core.Config.ScyllaConfiguration subtype the module uses. This information is used by Editor tooling to create or locate the correct configuration asset in the Project.
Declaration
public override Type GetConfigurationType()
Returns
| Type | Description |
|---|---|
| Type | The Type of the primary configuration class, which must be a subclass of
Scylla.Core.Config.ScyllaConfiguration, or |
Overrides
Remarks
The base implementation returns null. When a module declares multiple
configurations, override Scylla.Core.Modules.ScyllaModule.GetConfigurationTypes() as well so all types are
reported to tooling.
GetConfigurationTypes()
Returns all Scylla.Core.Config.ScyllaConfiguration types that this module supports, in the order in which they should be validated and applied. Override in derived classes that register more than one configuration asset.
Declaration
public override Type[] GetConfigurationTypes()
Returns
| Type | Description |
|---|---|
| Type[] | An array of Type objects, each of which must be a concrete subclass of
Scylla.Core.Config.ScyllaConfiguration. Returns an array containing only the type from
Scylla.Core.Modules.ScyllaModule.GetConfigurationType() when that method returns a non-null value, or an
empty array if the module has no configuration. Never returns |
Overrides
Remarks
The base implementation wraps the single type returned by Scylla.Core.Modules.ScyllaModule.GetConfigurationType() for backward compatibility. Modules with multiple configurations should override this method to return all types, and correspondingly override Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames() with matching entries at the same indices.
GetGamepadLeftStick()
Gets the current deflection of the left analog stick on the active gamepad.
Declaration
public Vector2 GetGamepadLeftStick()
Returns
| Type | Description |
|---|---|
| Vector2 | A |
GetGamepadLeftTrigger()
Gets the current analog value of the left trigger on the active gamepad.
Declaration
public float GetGamepadLeftTrigger()
Returns
| Type | Description |
|---|---|
| float | A |
GetGamepadRightStick()
Gets the current deflection of the right analog stick on the active gamepad.
Declaration
public Vector2 GetGamepadRightStick()
Returns
| Type | Description |
|---|---|
| Vector2 | A |
GetGamepadRightTrigger()
Gets the current analog value of the right trigger on the active gamepad.
Declaration
public float GetGamepadRightTrigger()
Returns
| Type | Description |
|---|---|
| float | A |
GetInputInfo()
Returns a human-readable single-line summary of the current input module state, intended for debug overlays or console display.
Declaration
public string GetInputInfo()
Returns
| Type | Description |
|---|---|
| string | A string in the format
|
GetMouseScrollDelta()
Gets the mouse scroll wheel delta accumulated since the last frame.
Declaration
public Vector2 GetMouseScrollDelta()
Returns
| Type | Description |
|---|---|
| Vector2 | A |
IsActionPressed(string)
Returns true while the named action is in the pressed/held state during
the current frame.
Declaration
public bool IsActionPressed(string actionID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique action identifier as registered with the action manager. |
Returns
| Type | Description |
|---|---|
| bool |
|
IsContextActive(string)
Returns true if the context with the specified ID is currently present
anywhere on the context stack (not necessarily at the top).
Declaration
public bool IsContextActive(string contextID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contextID | The unique ID of the context to check. |
Returns
| Type | Description |
|---|---|
| bool |
|
IsGamepadButtonPressed(GamepadButton)
Returns true while the specified gamepad button is held down during the
current frame. If no gamepad is connected the bridge returns false.
Declaration
public bool IsGamepadButtonPressed(GamepadButton button)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButton | button | The |
Returns
| Type | Description |
|---|---|
| bool |
|
IsKeyPressed(Key)
Returns true while the specified keyboard key is held down during the
current frame. Delegates to the active input bridge.
Declaration
public bool IsKeyPressed(Key key)
Parameters
| Type | Name | Description |
|---|---|---|
| Key | key | The Unity Input System |
Returns
| Type | Description |
|---|---|
| bool |
|
IsMouseButtonPressed(int)
Returns true while the specified mouse button is held down during the
current frame.
Declaration
public bool IsMouseButtonPressed(int button)
Parameters
| Type | Name | Description |
|---|---|---|
| int | button | Zero-based mouse button index: |
Returns
| Type | Description |
|---|---|
| bool |
|
IsScyllaKeyPressed(ScyllaKey)
Returns true while the specified keyboard key is held down during the
current frame, using the framework-owned ScyllaKey type so that
callers do not need a direct compile-time dependency on the Unity Input System
package.
Declaration
public bool IsScyllaKeyPressed(ScyllaKey key)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaKey | key | The ScyllaKey to query. Converted to a Unity Input System
|
Returns
| Type | Description |
|---|---|
| bool |
|
LoadBindings(string)
Loads previously saved binding overrides from the configured storage backend and applies them to the registered action assets.
Declaration
public void LoadBindings(string profileID = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | profileID | The identifier of the profile to load. Pass |
OnDisableModule()
Override this method to implement module-specific logic for when the module is paused. Called by Scylla.Core.Modules.ScyllaModule.DisableModule() when transitioning from Scylla.Core.Modules.ScyllaModuleState.Enabled to Scylla.Core.Modules.ScyllaModuleState.Disabled. Use this hook to suspend active processing, pause event subscriptions, or otherwise reduce the module to a low-cost idle state without releasing resources.
Declaration
protected override void OnDisableModule()
Overrides
Remarks
A disabled module incurs zero framework overhead. All allocated resources are retained
so the module can return to Scylla.Core.Modules.ScyllaModuleState.Enabled via
Scylla.Core.Modules.ScyllaModule.EnableModule() without re-initialization.
Do not call base.OnDisableModule() - the base implementation is empty.
See Also
OnEnableModule()
Override this method to implement module-specific logic for when the module becomes active. Called by Scylla.Core.Modules.ScyllaModule.EnableModule() when transitioning to Scylla.Core.Modules.ScyllaModuleState.Enabled. This hook is invoked both during the initial startup sequence (after Scylla.Core.Modules.ScyllaModule.StartModule()) and whenever the module is re-enabled after being disabled via Scylla.Core.Modules.ScyllaModule.DisableModule(). Use this hook to activate systems, restore event subscriptions, or resume processing that was paused in Scylla.Core.Modules.ScyllaModule.OnDisableModule().
Declaration
protected override void OnEnableModule()
Overrides
Remarks
Do not call base.OnEnableModule() - the base implementation is empty.
See Also
OnInitialize()
Override this method to implement module-specific initialization logic, such as loading configuration assets, allocating resources, and setting up internal subsystems. Called by Scylla.Core.Modules.ScyllaModule.Initialize() when the module transitions from Scylla.Core.Modules.ScyllaModuleState.Validated to Scylla.Core.Modules.ScyllaModuleState.Initialized. All hard module dependencies are available and fully initialized at this point.
Declaration
protected override void OnInitialize()
Overrides
Remarks
Typical implementation pattern for modules using the configuration slot system:
protected override void OnInitialize()
{
LoadConfigurationsFromSlots();
ApplyConfigFileOverrides();
ValidateAllConfigurations();
ApplyAllConfigurations();
}
Do not call base.OnInitialize() - the base implementation is empty.
See Also
OnShutdown()
Override this method to implement module-specific teardown logic, such as releasing unmanaged resources, unsubscribing from events, and disposing subsystems. Called by Scylla.Core.Modules.ScyllaModule.Shutdown() after Scylla.Core.Modules.ScyllaModule.DisableModule() has been called (if the module was enabled) and before the state transitions to Scylla.Core.Modules.ScyllaModuleState.Shutdown.
Declaration
protected override void OnShutdown()
Overrides
Remarks
After Scylla.Core.Modules.ScyllaModule.Shutdown() returns, the module is in a terminal state and no further
lifecycle methods will be called. Do not attempt to use framework services from within
this method as other modules may have already been shut down.
Do not call base.OnShutdown() - the base implementation is empty.
See Also
OnStart()
Override this method to implement module-specific startup logic that should run after all modules have been initialized. Called by Scylla.Core.Modules.ScyllaModule.StartModule() when the module transitions from Scylla.Core.Modules.ScyllaModuleState.Initialized to Scylla.Core.Modules.ScyllaModuleState.Started. Use this hook to wire up cross-module event subscriptions or start coroutines that depend on all modules being ready.
Declaration
protected override void OnStart()
Overrides
Remarks
Do not call base.OnStart() - the base implementation is empty.
See Also
PopContext()
Removes and returns the topmost InputContext from the context stack, restoring the action map configuration of the context beneath it.
Declaration
public InputContext PopContext()
Returns
| Type | Description |
|---|---|
| InputContext | The InputContext that was on top of the stack, or |
PushContext(InputContext)
Pushes an InputContext instance directly onto the context stack, activating its action map enable/disable rules and priority blocking behavior. The context does not need to be pre-registered.
Declaration
public bool PushContext(InputContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| InputContext | context | The context to push. Must not be |
Returns
| Type | Description |
|---|---|
| bool |
|
PushContext(string)
Looks up a registered InputContext by ID and pushes it onto the context stack, activating its action map enable/disable rules and priority blocking behavior.
Declaration
public bool PushContext(string contextID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contextID | The unique ID of a previously registered context. If no context with this ID
is registered, the push is silently ignored and |
Returns
| Type | Description |
|---|---|
| bool |
|
RegisterActionAsset(InputActionAsset)
Registers a Unity InputActionAsset with the action manager so its
action maps and actions become queryable through this module's API.
Declaration
public void RegisterActionAsset(InputActionAsset asset)
Parameters
| Type | Name | Description |
|---|---|---|
| InputActionAsset | asset | The |
Remarks
One asset (typically defined in the Configuration) is registered automatically during initialization. Call this method to register additional assets - for example, assets belonging to individual gameplay modules.
RegisterContext(InputContext)
Registers an InputContext with the context manager, making it available to be pushed onto the context stack by its ID.
Declaration
public bool RegisterContext(InputContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| InputContext | context | The context to register. Must not be |
Returns
| Type | Description |
|---|---|
| bool |
|
RegisterListener(IInputListener)
Registers an IInputListener to receive synchronous callbacks for structural input lifecycle events such as device connections, disconnections, and global enable/disable state changes.
Declaration
public void RegisterListener(IInputListener listener)
Parameters
| Type | Name | Description |
|---|---|---|
| IInputListener | listener | The listener to register. Must not be |
Remarks
For action-level events, prefer subscribing to SEX event types instead of using this listener interface. See IInputListener for a full description of the event categories covered by this interface.
ResetBindingsToDefaults(string)
Resets one or all action bindings back to the default values defined in the
registered InputActionAsset.
Declaration
public void ResetBindingsToDefaults(string actionID = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique ID of a single action to reset, or |
SaveBindings(string)
Persists the current binding overrides to the configured storage backend (JSON file or PlayerPrefs) for the specified profile.
Declaration
public void SaveBindings(string profileID = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | profileID | The identifier of the profile to save. Pass |
ShouldProcessInput(string)
Returns true when the context with the specified ID should process input
given the current context stack state and priority blocking rules.
Declaration
public bool ShouldProcessInput(string contextID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contextID | The unique ID of the context whose input processing eligibility to evaluate. |
Returns
| Type | Description |
|---|---|
| bool |
|
StartRebind(string, int)
Initiates an interactive runtime rebind operation that waits for the next user input and assigns it to the specified binding slot of the given action.
Declaration
public InputRebindOperation StartRebind(string actionID, int bindingIndex = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique ID of the action whose binding should be overridden. |
| int | bindingIndex | Zero-based index of the binding to modify within the action's binding list.
Defaults to |
Returns
| Type | Description |
|---|---|
| InputRebindOperation | An InputRebindOperation that tracks and controls the in-progress
rebind, or |
ToggleInput()
Toggles input processing between enabled and disabled states by calling either DisableInput() or EnableInput() based on the current value of IsInputEnabled.
Declaration
public void ToggleInput()
UnregisterActionAsset(InputActionAsset)
Unregisters a previously registered InputActionAsset from the action
manager. Actions defined in the asset will no longer be queryable.
Declaration
public void UnregisterActionAsset(InputActionAsset asset)
Parameters
| Type | Name | Description |
|---|---|---|
| InputActionAsset | asset | The |
UnregisterContext(string)
Unregisters a previously registered InputContext by its ID, removing it from the available context pool. If the context is currently active on the stack, behavior is determined by the context manager implementation.
Declaration
public bool UnregisterContext(string contextID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contextID | The unique ID of the context to unregister. |
Returns
| Type | Description |
|---|---|
| bool |
|
UnregisterListener(IInputListener)
Unregisters a previously registered IInputListener so it no
longer receives structural input lifecycle event callbacks. Does nothing if
listener is null or was never registered.
Declaration
public void UnregisterListener(IInputListener listener)
Parameters
| Type | Name | Description |
|---|---|---|
| IInputListener | listener | The listener to unregister. May be |
WasActionPerformedThisFrame(string)
Returns true during the single frame in which the named action fired its
performed callback (i.e., the action's interaction completed this frame).
Declaration
public bool WasActionPerformedThisFrame(string actionID)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The unique action identifier as registered with the action manager. |
Returns
| Type | Description |
|---|---|
| bool |
|
WasGamepadButtonPressedThisFrame(GamepadButton)
Returns true during the single frame in which the specified gamepad
button transitions from the released to the pressed state.
Declaration
public bool WasGamepadButtonPressedThisFrame(GamepadButton button)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButton | button | The |
Returns
| Type | Description |
|---|---|
| bool |
|
WasGamepadButtonReleasedThisFrame(GamepadButton)
Returns true during the single frame in which the specified gamepad
button transitions from the pressed to the released state.
Declaration
public bool WasGamepadButtonReleasedThisFrame(GamepadButton button)
Parameters
| Type | Name | Description |
|---|---|---|
| GamepadButton | button | The |
Returns
| Type | Description |
|---|---|
| bool |
|
WasKeyPressedThisFrame(Key)
Returns true during the single frame in which the specified keyboard key
transitions from the released to the pressed state.
Declaration
public bool WasKeyPressedThisFrame(Key key)
Parameters
| Type | Name | Description |
|---|---|---|
| Key | key | The Unity Input System |
Returns
| Type | Description |
|---|---|
| bool |
|
WasKeyReleasedThisFrame(Key)
Returns true during the single frame in which the specified keyboard key
transitions from the pressed to the released state.
Declaration
public bool WasKeyReleasedThisFrame(Key key)
Parameters
| Type | Name | Description |
|---|---|---|
| Key | key | The Unity Input System |
Returns
| Type | Description |
|---|---|
| bool |
|
WasMouseButtonPressedThisFrame(int)
Returns true during the single frame in which the specified mouse button
transitions from the released to the pressed state.
Declaration
public bool WasMouseButtonPressedThisFrame(int button)
Parameters
| Type | Name | Description |
|---|---|---|
| int | button | Zero-based mouse button index: |
Returns
| Type | Description |
|---|---|
| bool |
|
WasMouseButtonReleasedThisFrame(int)
Returns true during the single frame in which the specified mouse button
transitions from the pressed to the released state.
Declaration
public bool WasMouseButtonReleasedThisFrame(int button)
Parameters
| Type | Name | Description |
|---|---|---|
| int | button | Zero-based mouse button index: |
Returns
| Type | Description |
|---|---|
| bool |
|
WasScyllaKeyPressedThisFrame(ScyllaKey)
Returns true during the single frame in which the specified keyboard key
transitions from the released to the pressed state, using the framework-owned
ScyllaKey type to avoid a direct Unity Input System dependency.
Declaration
public bool WasScyllaKeyPressedThisFrame(ScyllaKey key)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaKey | key | The ScyllaKey to query. Converted to a Unity Input System
|
Returns
| Type | Description |
|---|---|
| bool |
|
WasScyllaKeyReleasedThisFrame(ScyllaKey)
Returns true during the single frame in which the specified keyboard key
transitions from the pressed to the released state, using the framework-owned
ScyllaKey type to avoid a direct Unity Input System dependency.
Declaration
public bool WasScyllaKeyReleasedThisFrame(ScyllaKey key)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaKey | key | The ScyllaKey to query. Converted to a Unity Input System
|
Returns
| Type | Description |
|---|---|
| bool |
|