Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Input
      • AutoResolveChange
      • AutoResolveResult
      • BindingConflict
      • BindingStorageSettings
      • BindingStorageType
      • BridgeSettings
      • BufferedInput
      • ConfigActionEntry
      • ConfigBindingEntry
      • ConfigConflict
      • ConfigSchemeGroup
      • ContextValidationMessage
      • ContextValidationSeverity
      • ControlScheme
      • ControlSchemeChangedEvent
      • ControlSchemeManager
      • ControlSchemeType
      • GamepadButton
      • GamepadType
      • IBindingStorage
      • IControlSchemeManager
      • IInputActionManager
      • IInputBindingManager
      • IInputBridgeManager
      • IInputBufferManager
      • IInputContextManager
      • IInputHintsManager
      • IInputListener
      • IScyllaInputBridge
      • InputActionCanceledEvent
      • InputActionManager
      • InputActionPerformedEvent
      • InputActionStartedEvent
      • InputBindingManager
      • InputBindingsLoadedEvent
      • InputBindingsSavedEvent
      • InputBridgeManager
      • InputBridgeQueryMode
      • InputBufferConsumedEvent
      • InputBufferManager
      • InputBufferedEvent
      • InputConflictResolution
      • InputContext
      • InputContextChangedEvent
      • InputContextDefinition
      • InputContextManager
      • InputContextPoppedEvent
      • InputContextPushedEvent
      • InputDeviceChangedEvent
      • InputDeviceConnectedEvent
      • InputDeviceDisconnectedEvent
      • InputDeviceType
      • InputDeviceUtil
      • InputDisabledEvent
      • InputEnabledEvent
      • InputEventType
      • InputHint
      • InputHintChangedEvent
      • InputHintsManager
      • InputIconSet
      • InputIconSet.IconMapping
      • InputIconSetChangedEvent
      • InputLoggingSettings
      • InputRebindCancelledEvent
      • InputRebindCompletedEvent
      • InputRebindManager
      • InputRebindOperation
      • InputRebindStartedEvent
      • InputRebindUtils
      • JSONFileBindingStorage
      • ManagedRebindCancelledEvent
      • ManagedRebindCompletedEvent
      • ManagedRebindDataRefreshedEvent
      • ManagedRebindStartedEvent
      • PlayerPrefsBindingStorage
      • RebindMode
      • RebindSettings
      • ScyllaInput
      • ScyllaInput.Meta
      • ScyllaInputAction
      • ScyllaInputActionMap
      • ScyllaInputBinding
      • ScyllaInputConfiguration
      • ScyllaInputContextConfiguration
      • ScyllaKey
      • ScyllaKeyConverter
      • ScyllaModifier
      • UnityInputSystemBridge
    • Scylla.Input.Editor
      • ControlSchemeDrawer
      • DeviceStatusWidget
      • IconMappingDrawer
      • InputIconSetEditor
      • ScyllaInputConfigurationEditor
      • ScyllaInputContextConfigurationEditor
      • ScyllaInputDependencyProvider
      • ScyllaInputEditor
      • ScyllaInputMenuItems
      • ScyllaInputWizard

    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.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    ScyllaModule
    ScyllaInput
    Implements
    IScyllaModule
    Inherited Members
    ScyllaModule.ConfigurationRegistry
    ScyllaModule.GetConfiguration<T>()
    ScyllaModule.ValidateAllConfigurations()
    ScyllaModule.ApplyAllConfigurations()
    ScyllaModule.State
    ScyllaModule.IsEnabled
    ScyllaModule.Initialize()
    ScyllaModule.StartModule()
    ScyllaModule.EnableModule()
    ScyllaModule.DisableModule()
    ScyllaModule.Shutdown()
    ScyllaModule.ValidateDependencies()
    ScyllaModule.InjectDependencies(IScyllaModuleManager)
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.transformHandle
    Component.gameObject
    Component.tag
    Object.GetEntityId()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.InstantiateAsync<T>(T, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion, InstantiateParameters, CancellationToken)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, InstantiateParameters, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate<T>(T, InstantiateParameters)
    Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsByType(Type)
    Object.FindObjectsByType(Type, FindObjectsInactive)
    Object.DontDestroyOnLoad(Object)
    Object.FindAnyObjectByType<T>()
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsByType<T>()
    Object.FindObjectsByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType(Type)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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 IScyllaInputBridge implementations and routes raw device queries to the active bridge. The default bridge wraps Unity's Input System.
    • ActionManager - owns registered InputActionAsset objects 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
    Scylla.Core.Modules.ScyllaModule.Info

    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
    Scylla.Core.Modules.ScyllaModule.Awake()

    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 InputActionAsset. The format is typically the action name or a fully-qualified map/action path.

    Returns
    Type Description
    ScyllaInputAction

    The matching ScyllaInputAction, or null if no action with the given ID is registered or the action manager is not yet initialized.

    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 0 when IsInputEnabled is false, the ID is unknown, or the action manager is not yet initialized.

    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 Vector2 value read from the action's current state. Returns Vector2.zero when IsInputEnabled is false, the ID is unknown, or the action manager is not yet initialized.

    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 0 (the primary binding).

    Returns
    Type Description
    string

    A string describing the current binding (e.g., "Space", "Left Stick/Up"), or null if the action or binding index is not found, or the binding manager is not yet initialized.

    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 null if the module has no configuration or the base class default is used without an override.

    Overrides
    Scylla.Core.Modules.ScyllaModule.GetConfiguration()
    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 Resources-relative path string such as "Config/MyModuleConfiguration", or null if the configuration must always be assigned manually in the Inspector and should never be auto-loaded. The base implementation returns null.

    Overrides
    Scylla.Core.Modules.ScyllaModule.GetConfigurationFileName()
    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 Resources-relative path strings (one per configuration), or an empty array if this module has no auto-loadable configurations. Individual array entries may be null to disable auto-loading for that particular slot. Never returns null.

    Overrides
    Scylla.Core.Modules.ScyllaModule.GetConfigurationFileNames()
    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 null if this module does not use any configuration asset.

    Overrides
    Scylla.Core.Modules.ScyllaModule.GetConfigurationType()
    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 null.

    Overrides
    Scylla.Core.Modules.ScyllaModule.GetConfigurationTypes()
    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 Vector2 whose x and y components each range from -1 (full left / full down) to +1 (full right / full up), relative to the stick's dead-zone as configured in the Input System. Returns Vector2.zero when IsInputEnabled is false, no gamepad is connected, or the bridge is not yet initialized.

    GetGamepadLeftTrigger()

    Gets the current analog value of the left trigger on the active gamepad.

    Declaration
    public float GetGamepadLeftTrigger()
    Returns
    Type Description
    float

    A float in the range 0 (fully released) to 1 (fully pressed). Returns 0 when IsInputEnabled is false, no gamepad is connected, or the bridge is not yet initialized.

    GetGamepadRightStick()

    Gets the current deflection of the right analog stick on the active gamepad.

    Declaration
    public Vector2 GetGamepadRightStick()
    Returns
    Type Description
    Vector2

    A Vector2 whose x and y components each range from -1 (full left / full down) to +1 (full right / full up), relative to the stick's dead-zone as configured in the Input System. Returns Vector2.zero when IsInputEnabled is false, no gamepad is connected, or the bridge is not yet initialized.

    GetGamepadRightTrigger()

    Gets the current analog value of the right trigger on the active gamepad.

    Declaration
    public float GetGamepadRightTrigger()
    Returns
    Type Description
    float

    A float in the range 0 (fully released) to 1 (fully pressed). Returns 0 when IsInputEnabled is false, no gamepad is connected, or the bridge is not yet initialized.

    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 Input: {Enabled|Disabled} | Mouse: {x,y} | Devices: {n} | Last: {name}, where Mouse is the current screen-space mouse position, Devices is the total number of connected devices known to the bridge, and Last is the display name of the last active input device (or "None" if no device has been used yet or the bridge is unavailable).

    GetMouseScrollDelta()

    Gets the mouse scroll wheel delta accumulated since the last frame.

    Declaration
    public Vector2 GetMouseScrollDelta()
    Returns
    Type Description
    Vector2

    A Vector2 where the y component is the vertical scroll amount (positive = scroll up) and the x component is the horizontal scroll amount (positive = scroll right) as reported by the active bridge. Returns Vector2.zero when IsInputEnabled is false or the bridge is not yet initialized.

    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

    true if the action is currently held and IsInputEnabled is true; false if the action is not pressed, the ID is unknown, or the action manager is not yet initialized.

    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

    true if the context is on the stack; false if it is not on the stack, the ID is unrecognized, or the context manager is not yet initialized.

    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 UnityEngine.InputSystem.GamepadButton to query (e.g., GamepadButton.South, GamepadButton.LeftTrigger).

    Returns
    Type Description
    bool

    true if the button is currently held and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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 Key to query. Prefer the IsScyllaKeyPressed(ScyllaKey) overload to avoid a direct Input System dependency in calling assemblies.

    Returns
    Type Description
    bool

    true if the key is currently held and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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: 0 = left, 1 = right, 2 = middle. Values outside the range supported by the active bridge return false.

    Returns
    Type Description
    bool

    true if the button is currently held and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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 Key via ToInputSystemKey(ScyllaKey) before the bridge is queried.

    Returns
    Type Description
    bool

    true if the key is currently held and IsInputEnabled is true; false otherwise.

    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 null to load the currently active profile as determined by the binding manager. Does nothing if no saved bindings exist for the profile.

    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
    Scylla.Core.Modules.ScyllaModule.OnDisableModule()
    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
    DisableModule()
    OnEnableModule()

    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
    Scylla.Core.Modules.ScyllaModule.OnEnableModule()
    Remarks

    Do not call base.OnEnableModule() - the base implementation is empty.

    See Also
    EnableModule()
    OnDisableModule()

    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
    Scylla.Core.Modules.ScyllaModule.OnInitialize()
    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
    Initialize()
    LoadConfigurationsFromSlots()
    ApplyConfigFileOverrides()
    ValidateAllConfigurations()
    ApplyAllConfigurations()

    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
    Scylla.Core.Modules.ScyllaModule.OnShutdown()
    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
    Shutdown()

    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
    Scylla.Core.Modules.ScyllaModule.OnStart()
    Remarks

    Do not call base.OnStart() - the base implementation is empty.

    See Also
    StartModule()

    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 null if the stack was empty or the context manager is not yet initialized.

    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 null.

    Returns
    Type Description
    bool

    true if the context was pushed; false if context is null or the context manager is not yet initialized.

    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 false is returned.

    Returns
    Type Description
    bool

    true if the context was found and pushed; false otherwise or when the context manager is not yet initialized.

    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 InputActionAsset to register. Passing null is silently ignored by the underlying action manager.

    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 null and must have a non-empty ContextID.

    Returns
    Type Description
    bool

    true if the context was successfully registered; false if registration failed (e.g., the context manager is not yet initialized or the ID is already registered).

    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 null. Duplicate registrations are silently ignored - a listener is never notified more than once per event.

    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 null to reset all actions across all registered assets simultaneously.

    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 null to save to the currently active profile as determined by the binding manager.

    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

    true if input should reach this context based on stack priority and blocking flags; false if the context is blocked by a higher-priority context, is not on the stack, or the context manager is not yet initialized.

    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 0 (the primary binding).

    Returns
    Type Description
    InputRebindOperation

    An InputRebindOperation that tracks and controls the in-progress rebind, or null if the action was not found, the binding index is out of range, or the binding manager is not yet initialized.

    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 InputActionAsset to unregister. Passing null or an asset that was never registered is silently ignored.

    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

    true if the context was found and removed; false if no context with the given ID is registered or the context manager is not yet initialized.

    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 null.

    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

    true if the action was performed this frame and IsInputEnabled is true; false if the action was not performed, the ID is unknown, or the action manager is not yet initialized.

    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 UnityEngine.InputSystem.GamepadButton to query.

    Returns
    Type Description
    bool

    true if the button was pressed this frame and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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 UnityEngine.InputSystem.GamepadButton to query.

    Returns
    Type Description
    bool

    true if the button was released this frame and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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 Key to query. Prefer the WasScyllaKeyPressedThisFrame(ScyllaKey) overload to avoid a direct Input System dependency in calling assemblies.

    Returns
    Type Description
    bool

    true if the key was pressed this frame and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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 Key to query. Prefer the WasScyllaKeyReleasedThisFrame(ScyllaKey) overload to avoid a direct Input System dependency in calling assemblies.

    Returns
    Type Description
    bool

    true if the key was released this frame and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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: 0 = left, 1 = right, 2 = middle. Values outside the range supported by the active bridge return false.

    Returns
    Type Description
    bool

    true if the button was pressed this frame and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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: 0 = left, 1 = right, 2 = middle. Values outside the range supported by the active bridge return false.

    Returns
    Type Description
    bool

    true if the button was released this frame and IsInputEnabled is true; false otherwise or when the bridge is not available.

    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 Key via ToInputSystemKey(ScyllaKey) before the bridge is queried.

    Returns
    Type Description
    bool

    true if the key was pressed this frame and IsInputEnabled is true; false otherwise.

    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 Key via ToInputSystemKey(ScyllaKey) before the bridge is queried.

    Returns
    Type Description
    bool

    true if the key was released this frame and IsInputEnabled is true; false otherwise.

    Implements

    Scylla.Core.Modules.IScyllaModule

    See Also

    ScyllaInputConfiguration
    ScyllaKey
    ScyllaModifier
    InputContext
    IInputListener
    In this article
    Back to top Scylla Framework - Input Module API Documentation