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 InputControlPathUtil

    Reads the <Device> prefix out of a Unity Input System control path.

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

    Lives beside the conflict engine rather than with the rebinding helpers because the engine must not depend on anything under the rebinding namespace: the same rules run at edit time, where no rebinding manager exists.

    Methods

    DevicePrefixMatches(string, int, int, string, int, int)

    Reports whether two already-located device prefixes match, comparing spans so no substring is allocated.

    Declaration
    public static bool DevicePrefixMatches(string pathA, int startA, int lengthA, string pathB, int startB, int lengthB)
    Parameters
    Type Name Description
    string pathA

    First control path.

    int startA

    Start of the first prefix.

    int lengthA

    Length of the first prefix, or zero for none.

    string pathB

    Second control path.

    int startB

    Start of the second prefix.

    int lengthB

    Length of the second prefix, or zero for none.

    Returns
    Type Description
    bool

    true when the device classes match, or either length is zero.

    Remarks

    This is the overload the conflict engine calls, using ranges precomputed once per binding rather than rescanned on every comparison. A length of zero encodes "no recognizable prefix" and matches unconditionally, which is unambiguous because a real prefix is at least one character.

    DevicePrefixMatches(string, string)

    Reports whether two control paths name the same device class.

    Declaration
    public static bool DevicePrefixMatches(string pathA, string pathB)
    Parameters
    Type Name Description
    string pathA

    First control path.

    string pathB

    Second control path.

    Returns
    Type Description
    bool

    true when the device classes match, or either path has no prefix.

    Remarks

    A path with no recognizable prefix matches everything. That is deliberate: the answer feeds a conflict check, and the conservative outcome is to let the check proceed rather than exclude a pair on the strength of an unparseable path.

    GetDevicePrefix(string)

    Extracts the device prefix from a control path, for example Keyboard from <Keyboard>/space.

    Declaration
    public static string GetDevicePrefix(string controlPath)
    Parameters
    Type Name Description
    string controlPath

    The control path.

    Returns
    Type Description
    string

    The prefix, or an empty string when the path carries none.

    TryFindDevicePrefixRange(string, out int, out int)

    Locates the device prefix inside a control path and returns its inner range, between the angle brackets, without allocating.

    Declaration
    public static bool TryFindDevicePrefixRange(string controlPath, out int start, out int length)
    Parameters
    Type Name Description
    string controlPath

    The control path, for example <Keyboard>/space.

    int start

    Index of the first character after the opening bracket.

    int length

    Number of characters before the closing bracket.

    Returns
    Type Description
    bool

    true when a prefix was found.

    See Also

    InputConflictEngine
    In this article
    Back to top Scylla Framework - Input Module API Documentation