Struct InputConflictRecord
One non-composite binding, reduced to exactly the values the conflict predicate reads.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public readonly struct InputConflictRecord
Remarks
Everything here is precomputed once per snapshot rather than derived per comparison. The code this replaces recomputed the modifier composite path with a full binding walk, the device prefix range with a scan, and the registered-scheme test with a loop over the declared columns, all of it twice per candidate pair.
Identity is ActionID alone, compared ordinally. Two actions with the same name in different maps are therefore one action as far as the same-binding, same-row and deduplication rules are concerned. That is the shipped runtime behavior; changing it is a deliberate act, not a cleanup. MapID is carried so a caller that needs map-qualified identity can build one.
See the performance contract in this file's header before adding a member or a by-value parameter.
Constructors
InputConflictRecord(string, string, string, string, string, string, string, string, int, int, int, int, bool, bool, bool, bool, in InputInteractionSignature)
Initializes a record. Built by InputConflictRecordBuilder; callers should not assemble these by hand outside tests.
Declaration
public InputConflictRecord(string actionID, string mapID, string scopeID, string schemeGroup, string partName, string rawPath, string normalizedPath, string compositeSignature, int bindingIndex, int devicePrefixStart, int devicePrefixLength, int modifierDepth, bool isComposite, bool isModifierPart, bool isInRegisteredSchemes, bool isRebindable, in InputInteractionSignature interactionSignature = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | actionID | The owning action's identifier. |
| string | mapID | The owning action map's identifier. |
| string | scopeID | The scope key. |
| string | schemeGroup | The column, or empty. |
| string | partName | The composite part name, or empty. |
| string | rawPath | The control path as reported. |
| string | normalizedPath | The path used for equality. |
| string | compositeSignature | The whole combination's joined paths, or empty. |
| int | bindingIndex | The flat binding index. |
| int | devicePrefixStart | Start of the device prefix. |
| int | devicePrefixLength | Length of the device prefix, or zero. |
| int | modifierDepth | The owning action's modifier depth. |
| bool | isComposite | Whether this is a composite container. |
| bool | isModifierPart | Whether this is a modifier composite part. |
| bool | isInRegisteredSchemes | Whether the column was declared. |
| bool | isRebindable | Whether the control can be captured. |
| InputInteractionSignature | interactionSignature | What drives the binding. |
Fields
ActionID
The owning action's identifier. The sole identity key.
Declaration
public readonly string ActionID
Field Value
| Type | Description |
|---|---|
| string |
BindingIndex
The flat binding index within the owning action.
Declaration
public readonly int BindingIndex
Field Value
| Type | Description |
|---|---|
| int |
CompositeSignature
The whole combination this binding is part of, or empty when it is not part of a modifier composite.
Declaration
public readonly string CompositeSignature
Field Value
| Type | Description |
|---|---|
| string |
Remarks
Every part's normalized path joined in order, so Ctrl+S and Ctrl+D
carry different signatures even though both are governed by the same modifier.
The modifier alone is not enough, and using it was a false positive: the two
Ctrl parts of Ctrl+S and Ctrl+D are the same key under the same
modifier, so they compared equal and were reported as colliding. Pressing Ctrl fires
neither action; only the full combination does, so the full combination is what has
to match.
Joined in the order the parts appear, which is fixed per composite type rather than
chosen by the author: two ButtonWithOneModifier composites always list the
modifier before the button. Two composites of different types never compare equal
anyway, since their part counts differ.
DevicePrefixLength
Length of the device prefix, or 0 when the path carries no recognizable one.
Zero means the device-class test passes unconditionally, matching the shipped rule.
Declaration
public readonly int DevicePrefixLength
Field Value
| Type | Description |
|---|---|
| int |
DevicePrefixStart
Start of the device prefix inside NormalizedPath.
Declaration
public readonly int DevicePrefixStart
Field Value
| Type | Description |
|---|---|
| int |
InteractionSignature
What drives this binding, reduced to what the disjointness rule needs.
Declaration
public readonly InputInteractionSignature InteractionSignature
Field Value
| Type | Description |
|---|---|
| InputInteractionSignature |
Remarks
Four bytes, and it lands in the padding the struct already carried, which is why it does not move the size stated in this file's header. It is a packed value rather than the authored string because the comparison is arithmetic and the string would have to be parsed on every one of them.
IsComposite
Whether this is a composite container rather than a real binding.
Declaration
public readonly bool IsComposite
Field Value
| Type | Description |
|---|---|
| bool |
IsInRegisteredSchemes
Whether this binding belongs to a column the caller declared.
Declaration
public readonly bool IsInRegisteredSchemes
Field Value
| Type | Description |
|---|---|
| bool |
IsModifierPart
Whether this binding is a part of a modifier composite.
Declaration
public readonly bool IsModifierPart
Field Value
| Type | Description |
|---|---|
| bool |
IsRebindable
Whether the control can physically be captured. Not read by the engine; carried so callers do not need a parallel structure to answer it.
Declaration
public readonly bool IsRebindable
Field Value
| Type | Description |
|---|---|
| bool |
MapID
The owning action map's identifier. Reported, never compared.
Declaration
public readonly string MapID
Field Value
| Type | Description |
|---|---|
| string |
ModifierDepth
How many modifier keys the owning action's composite requires.
Declaration
public readonly int ModifierDepth
Field Value
| Type | Description |
|---|---|
| int |
NormalizedPath
The path used for equality, with alternative spellings of one control collapsed onto a canonical form by IInputControlAliasResolver.
Declaration
public readonly string NormalizedPath
Field Value
| Type | Description |
|---|---|
| string |
Remarks
Distinct from RawPath whenever the binding was authored under an
alias or a usage: <Gamepad>/cross is recorded raw and compared as
<Gamepad>/buttonSouth. Both feeds normalize, so the two agree.
Note that Unity does not do this itself. InputBinding.effectivePath is the
override or the authored string verbatim, and alias resolution happens only when a
binding is matched against a live device, where it produces a control list rather
than a rewritten path. Comparing raw paths would therefore miss a real collision.
PartName
The composite part name, or empty for a plain binding. Never null.
Declaration
public readonly string PartName
Field Value
| Type | Description |
|---|---|
| string |
RawPath
The control path as the caller supplied or the binding reported it.
Declaration
public readonly string RawPath
Field Value
| Type | Description |
|---|---|
| string |
SchemeGroup
The column this binding belongs to, empty when the binding declares no scheme.
Declaration
public readonly string SchemeGroup
Field Value
| Type | Description |
|---|---|
| string |
ScopeID
The key handed to IInputConflictScope. A config layout group ID under the layout scope, an action map name under the context scope.
Declaration
public readonly string ScopeID
Field Value
| Type | Description |
|---|---|
| string |