Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Input
      • AutoResolveChange
      • AutoResolveResult
      • BindingConflict
      • BindingStorageSettings
      • BindingStorageType
      • BridgeSettings
      • BufferedInput
      • ConfigActionEntry
      • ConfigActionGroup
      • ConfigBindingEntry
      • ConfigConflict
      • ConfigGroupExclusion
      • ConfigLayout
      • ConfigLayout.Builder
      • ConfigLayoutColumnDefinition
      • ConfigLayoutConflictScope
      • ConfigLayoutDefinition
      • ConfigLayoutExclusionDefinition
      • ConfigLayoutGroupDefinition
      • ConfigLayoutGroupMode
      • ConfigLayoutMemberReference
      • ConfigLayoutValidationMessage
      • ConfigLayoutValidationSeverity
      • ConfigSchemeGroup
      • ContextConflictScope
      • ContextValidationMessage
      • ContextValidationSeverity
      • ControlScheme
      • ControlSchemeChangedEvent
      • ControlSchemeManager
      • ControlSchemeType
      • GamepadButton
      • GamepadType
      • IBindingStorage
      • IControlSchemeManager
      • IInputActionManager
      • IInputBindingManager
      • IInputBridgeManager
      • IInputBufferManager
      • IInputConflictScope
      • IInputContextManager
      • IInputControlAliasResolver
      • IInputHintsManager
      • IInputListener
      • IInputRebindabilityProvider
      • IScyllaInputBridge
      • IdentityControlAliasResolver
      • InputActionCanceledEvent
      • InputActionManager
      • InputActionMapNode
      • InputActionMetadata
      • InputActionNode
      • InputActionPerformedEvent
      • InputActionStartedEvent
      • InputActionsDocument
      • InputActionsDocumentIO
      • InputActionsJSONKeys
      • InputAnnotation
      • InputAssetInfo
      • InputBindingGroups
      • InputBindingManager
      • InputBindingMetadata
      • InputBindingNode
      • InputBindingsLoadedEvent
      • InputBindingsSavedEvent
      • InputBridgeManager
      • InputBridgeQueryMode
      • InputBufferConsumedEvent
      • InputBufferManager
      • InputBufferedEvent
      • InputCodegenSettings
      • InputCompositeUtil
      • InputConflictEngine
      • InputConflictPair
      • InputConflictPolicy
      • InputConflictReason
      • InputConflictRecord
      • InputConflictRecordBuilder
      • InputConflictResolution
      • InputConflictSet
      • InputContext
      • InputContextChangedEvent
      • InputContextDefinition
      • InputContextExclusivity
      • InputContextManager
      • InputContextPoppedEvent
      • InputContextPushedEvent
      • InputControlAliasEntry
      • InputControlAliasResolver
      • InputControlAliasScope
      • InputControlPathUtil
      • InputControlSchemeNode
      • InputDeviceChangedEvent
      • InputDeviceConnectedEvent
      • InputDeviceDisconnectedEvent
      • InputDeviceType
      • InputDeviceUtil
      • InputDisabledEvent
      • InputEnabledEvent
      • InputEventType
      • InputHint
      • InputHintChangedEvent
      • InputHintsManager
      • InputIconSet
      • InputIconSet.IconMapping
      • InputIconSetChangedEvent
      • InputInteractionKind
      • InputInteractionResolver
      • InputInteractionSignature
      • InputJSONMember
      • InputJSONNode
      • InputJSONNodeReader
      • InputJSONNodeType
      • InputJSONNodeWriter
      • InputLoggingSettings
      • InputMapMetadata
      • InputMetadataRebindabilityProvider
      • InputMetadataReconciler
      • InputMetadataRecordKind
      • InputModifierMetadataUtil
      • InputOrphanRecord
      • InputRebindCancelledEvent
      • InputRebindCompletedEvent
      • InputRebindManager
      • InputRebindOperation
      • InputRebindStartedEvent
      • InputRebindUtils
      • InputRebindability
      • InputReconcileAction
      • InputReconcileOptions
      • InputReconcileReport
      • InputReconcileReport.Entry
      • InputSchemeDeviceNode
      • InputSchemeMetadata
      • JSONFileBindingStorage
      • ManagedRebindCancelledEvent
      • ManagedRebindCompletedEvent
      • ManagedRebindDataRefreshedEvent
      • ManagedRebindStartedEvent
      • PlayerPrefsBindingStorage
      • RebindMode
      • RebindSettings
      • ScyllaInput
      • ScyllaInput.Meta
      • ScyllaInputAction
      • ScyllaInputActionMap
      • ScyllaInputActionsMetadata
      • ScyllaInputActionsMetadataMigrator
      • ScyllaInputBinding
      • ScyllaInputConfiguration
      • ScyllaInputContextConfiguration
      • ScyllaKey
      • ScyllaKeyConverter
      • ScyllaModifier
      • UnityInputSystemBridge
    • Scylla.Input.Editor
      • DeviceStatusWidget
      • IconMappingDrawer
      • InputIconSetEditor
      • ScyllaInputActionsMetadataEditor
      • ScyllaInputConfigurationEditor
      • ScyllaInputContextConfigurationEditor
      • ScyllaInputDependencyProvider
      • ScyllaInputEditor
      • ScyllaInputGameProfile
      • ScyllaInputGameProfiles
      • ScyllaInputMenuItems
      • ScyllaInputWizard

    Class ScyllaInputBinding

    A snapshot wrapper around a single Unity InputBinding, providing convenient access to binding metadata, override state, display strings, and device type classification.

    Inheritance
    object
    ScyllaInputBinding
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Scylla.Input
    Assembly: ScyllaInput.dll
    Syntax
    public class ScyllaInputBinding
    Remarks

    Each ScyllaInputBinding corresponds to one entry in the flat InputAction.bindings list of the underlying Unity action. Unity's binding list uses a flat structure even for composite bindings: a composite is represented as a "container" entry (where IsComposite is true) followed immediately by the individual part entries (where IsPartOfComposite is true). Both the container and its parts have separate ScyllaInputBinding instances, and both are included in Bindings.

    The Path property holds the design-time path exactly as authored in the Unity asset (e.g., "<Keyboard>/space"). The EffectivePath reflects any runtime override applied via rebinding; it equals Path when no override is active.

    Instances are created and owned by ScyllaInputAction. Call RefreshBindings() after a rebind operation to rebuild the list with updated EffectivePath and OverridePath values. Alternatively, call Refresh(InputBinding) on an existing instance to update it in place.

    Constructors

    ScyllaInputBinding(InputBinding, int, string)

    Initializes a new ScyllaInputBinding from a Unity InputBinding and associated metadata.

    Declaration
    public ScyllaInputBinding(InputBinding unityBinding, int bindingIndex, string actionID)
    Parameters
    Type Name Description
    InputBinding unityBinding

    The Unity InputBinding struct to wrap. Because InputBinding is a struct, a copy is stored internally.

    int bindingIndex

    The zero-based index of this binding within the owning action's flat binding list (InputAction.bindings). Used to construct the ToString() representation and to pass to rebind operations.

    string actionID

    The ActionID of the ScyllaInputAction that owns this binding. Stored for display and diagnostic purposes.

    Remarks

    The DisplayString is generated immediately from the effective path via InputControlPath.ToHumanReadableString with the OmitDevice option, so it reads as a short label like "Space" rather than "Keyboard/Space".

    Properties

    ActionID

    Gets the ActionID of the ScyllaInputAction that owns this binding.

    Declaration
    public string ActionID { get; }
    Property Value
    Type Description
    string

    Never null.

    BindingID

    Gets the stable GUID that uniquely identifies this binding within the InputActionAsset.

    Declaration
    public Guid BindingID { get; }
    Property Value
    Type Description
    Guid

    Taken directly from InputBinding.id. This GUID persists across domain reloads and is used by Unity's rebind serialization to match overrides to the correct binding slot.

    BindingIndex

    Gets the zero-based index of this binding within the owning action's flat binding list.

    Declaration
    public int BindingIndex { get; }
    Property Value
    Type Description
    int

    Matches the i parameter supplied to the constructor. Used when calling Unity rebind APIs that require a binding index.

    DisplayString

    Gets the human-readable display label for this binding generated at construction time (or after the last Refresh(InputBinding)).

    Declaration
    public string DisplayString { get; }
    Property Value
    Type Description
    string

    Derived from EffectivePath using InputControlPath.HumanReadableStringOptions.OmitDevice, so it returns just the control name without the device prefix (e.g., "Space" rather than "Keyboard/Space"). Empty string when the path is unavailable.

    EffectiveInteractions

    Gets the interactions actually in force, which an override replaces rather than adds to.

    Declaration
    public string EffectiveInteractions { get; }
    Property Value
    Type Description
    string
    Remarks

    Mirrored here for the same reason EffectivePath is: reading it off the Unity binding means copying a large struct, and a value re-read on Refresh(InputBinding) is the only one that survives a rebind.

    Not the whole story for a composite part, which ignores its own interactions and takes its container's. Callers that need the effective answer should go through InputInteractionResolver.ResolveForBinding rather than reading this directly.

    EffectivePath

    Gets the control path currently in effect after applying any runtime override.

    Declaration
    public string EffectivePath { get; }
    Property Value
    Type Description
    string

    Equals Path when no override is active. When an override has been applied via rebinding, this reflects the new path (e.g., the player's custom key assignment). Use this property for all queries that need to reflect the player's current configuration.

    Groups

    Gets the semicolon-separated list of control scheme group names this binding belongs to.

    Declaration
    public string Groups { get; }
    Property Value
    Type Description
    string

    For example, "Keyboard;Mouse" or "Gamepad". An empty string means the binding applies to all control schemes. Use BelongsToGroup(string) for a convenient group membership test.

    HasOverride

    Gets a value indicating whether a runtime override path has been applied to this binding (e.g., via a rebind operation).

    Declaration
    public bool HasOverride { get; }
    Property Value
    Type Description
    bool

    true when InputBinding.overridePath is not null; otherwise false.

    Remarks

    The test is against null rather than emptiness, and the difference matters. Unity uses null to mean "no override" and an empty string to mean "deliberately unbound", and its own InputBinding.hasOverrides makes the same distinction. Treating an empty override as no override would report a binding the player has cleared as untouched, which in turn would drop it from a saved profile and quietly restore the asset default on the next load.

    So a cleared binding has HasOverride true and both OverridePath and EffectivePath empty.

    Interactions

    Gets the interactions authored on this binding, before any override.

    Declaration
    public string Interactions { get; }
    Property Value
    Type Description
    string

    IsComposite

    Gets a value indicating whether this binding is a composite container entry (the header row before the individual part rows in the flat binding list).

    Declaration
    public bool IsComposite { get; }
    Property Value
    Type Description
    bool

    true for the container entry of composite bindings such as ButtonWithOneModifier or 2DVector; false for part entries and simple bindings.

    IsPartOfComposite

    Gets a value indicating whether this binding is one of the part entries within a composite binding group (i.e., it follows a composite container entry in the flat binding list).

    Declaration
    public bool IsPartOfComposite { get; }
    Property Value
    Type Description
    bool

    true if this entry is a named part (e.g., "button", "modifier") inside a composite; false for composite containers and standalone bindings.

    Name

    Gets the optional name of this binding entry within a composite.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    string

    For composite parts, this is the role name assigned in the Unity asset (e.g., "button", "modifier", "modifier1", "modifier2", "up", "down", etc.). For top-level or composite-container bindings the name is typically an empty string.

    OverridePath

    Gets the runtime override path that replaces the design-time Path, or an empty string when there is no override.

    Declaration
    public string OverridePath { get; }
    Property Value
    Type Description
    string

    Taken from InputBinding.overridePath, with null normalised to empty. Because of that normalisation this property cannot distinguish an unbound binding from one that was never overridden; use HasOverride for that.

    Path

    Gets the design-time control path for this binding as authored in the Unity asset (e.g., "<Keyboard>/space").

    Declaration
    public string Path { get; }
    Property Value
    Type Description
    string

    Taken from InputBinding.path. Never null; may be empty for composite container entries. This path is not affected by runtime overrides; see EffectivePath for the in-use path.

    UnityBinding

    Gets the underlying Unity InputBinding struct that this object wraps.

    Declaration
    public InputBinding UnityBinding { get; }
    Property Value
    Type Description
    InputBinding

    A copy of the InputBinding struct. Updated by Refresh(InputBinding) to reflect the latest state after a rebind.

    Methods

    BelongsToGroup(string)

    Determines whether this binding belongs to the specified control scheme group.

    Declaration
    public bool BelongsToGroup(string group)
    Parameters
    Type Name Description
    string group

    The control scheme group name to check (e.g., "Keyboard", "Gamepad"). Case-insensitive. A null or empty value always returns false.

    Returns
    Type Description
    bool

    true if Groups names group as one of its entries; otherwise false.

    Remarks

    Compares whole entries of the semicolon-separated Groups string, case-insensitively and ignoring surrounding whitespace. A binding with Groups = "Keyboard;Mouse" returns true for both "Keyboard" and "Mouse", and a binding in "Keyboard&Mouse" returns false for "Keyboard", because that is a different group.

    This matches the Input System, which resolves a binding mask by comparing the two group lists entry by entry rather than as text. An earlier version of this method tested for a substring, which made a group name a prefix of another name silently select that other group's bindings as well.

    GetDeviceType()

    Returns the InputDeviceType that this binding targets, inferred from the device component of its EffectivePath.

    Declaration
    public InputDeviceType GetDeviceType()
    Returns
    Type Description
    InputDeviceType

    The InputDeviceType matching the device prefix in EffectivePath, or Unknown if the path is empty or does not match a recognised device token.

    Remarks

    Delegates to GetDeviceTypeFromPath(string), which parses well-known device tokens such as <Keyboard>, <Gamepad>, <Mouse>, <Touchscreen>, <Joystick>, and <Pen>.

    GetDisplayString(HumanReadableStringOptions)

    Returns the human-readable display string for this binding's effective path, formatted according to the specified options.

    Declaration
    public string GetDisplayString(InputControlPath.HumanReadableStringOptions options = HumanReadableStringOptions.OmitDevice)
    Parameters
    Type Name Description
    InputControlPath.HumanReadableStringOptions options

    Formatting options that control the output style. Defaults to InputControlPath.HumanReadableStringOptions.OmitDevice, which returns just the control name without the device prefix.

    Returns
    Type Description
    string

    A formatted, human-readable label for this binding's effective path (e.g., "Space", "South Button", "Left Stick/Up").

    Remarks

    Unlike the cached DisplayString property, this method always calls InputControlPath.ToHumanReadableString at the time of the call, allowing different formatting options to be applied on demand.

    Refresh(InputBinding)

    Updates all mutable properties of this binding from the provided Unity InputBinding struct, reflecting any rebind changes.

    Declaration
    public void Refresh(InputBinding unityBinding)
    Parameters
    Type Name Description
    InputBinding unityBinding

    The updated Unity InputBinding struct (e.g., retrieved after a rebind operation from InputAction.bindings[BindingIndex]).

    Remarks

    Call this method after a rebind operation to keep the Scylla binding wrapper in sync with the Unity-side state. Refreshes UnityBinding, Path, EffectivePath, HasOverride, OverridePath, and DisplayString. Read-only properties (BindingID, BindingIndex, ActionID, Name, Groups, IsComposite, IsPartOfComposite) are not changed.

    ToString()

    Returns a human-readable string representation of this binding, including its owning action ID, binding index, display string, and raw path.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string in the form "[ActionID:BindingIndex] DisplayString (Path)".

    Overrides
    object.ToString()
    In this article
    Back to top Scylla Framework - Input Module API Documentation