Class BindingConflict
Describes a single binding conflict detected when a player attempts to assign an input control path that is already occupied by another action.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public class BindingConflict
Remarks
Instances are created and returned by GetConflicts(string, string) during conflict detection. A conflict occurs when the effective path of an existing binding - either its default path or an applied override - is identical (case-insensitive) to the candidate path being evaluated.
Each instance identifies exactly one conflicting binding. If the candidate path
is shared by multiple actions or multiple bindings within a single action,
GetConflicts returns one BindingConflict per colliding binding.
Composite binding containers (bindings for which
InputBinding.isComposite is true) are never included in conflict
results - only their leaf part bindings are evaluated.
The information carried by a BindingConflict is read-only. Use it to
present an informative UI message or to automatically resolve the conflict by
clearing the existing binding via
ClearBindingOverride(string, int).
Constructors
BindingConflict(string, string, int, string, string)
Initializes a new BindingConflict with full details about the conflicting binding.
Declaration
public BindingConflict(string conflictingActionID, string conflictingMapID, int conflictingBindingIndex, string conflictingPath, string displayString)
Parameters
| Type | Name | Description |
|---|---|---|
| string | conflictingActionID | The name of the Unity Input System action that already occupies the candidate input path. Used to identify which action must be cleared or reassigned to resolve the conflict. |
| string | conflictingMapID | The name of the Unity action map that contains the conflicting action. Together
with |
| int | conflictingBindingIndex | Zero-based index of the conflicting binding within the action's
|
| string | conflictingPath | The Unity Input System control path that is shared (e.g.,
|
| string | displayString | A human-readable label for the conflicting input (e.g., |
Properties
ConflictingActionID
Gets the name of the Unity Input System action that already occupies the conflicting input path.
Declaration
public string ConflictingActionID { get; }
Property Value
| Type | Description |
|---|---|
| string | A non-null string matching the |
ConflictingBindingIndex
Gets the zero-based index of the conflicting binding within the action's
bindings collection.
Declaration
public int ConflictingBindingIndex { get; }
Property Value
| Type | Description |
|---|---|
| int | A non-negative integer. Pass this along with ConflictingActionID to ClearBindingOverride(string, int) to remove the conflict. |
ConflictingMapID
Gets the name of the Unity action map that contains the conflicting action.
Declaration
public string ConflictingMapID { get; }
Property Value
| Type | Description |
|---|---|
| string | A non-null string matching the |
ConflictingPath
Gets the Unity Input System control path that is shared between the candidate binding and this conflicting binding.
Declaration
public string ConflictingPath { get; }
Property Value
| Type | Description |
|---|---|
| string | A non-null control path string such as |
DisplayString
Gets a human-readable label for the conflicting input control.
Declaration
public string DisplayString { get; }
Property Value
| Type | Description |
|---|---|
| string | A localized display string generated by Unity's Input System (e.g., |
Methods
ToString()
Returns a diagnostic string summarizing the conflict in the form
"Conflict: '<path>' is already bound to '<action>' in map '<map>'".
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A human-readable string combining ConflictingPath, ConflictingActionID, and ConflictingMapID. Suitable for log output and debugging; not intended for end-user display. |