Vixen
02b45cc4
csharp
public sealed class InputBinding

One way an action can be triggered.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A binding is either a control — <Gamepad>/leftStick — or a composite whose parts are controls. It carries its own processors, its own interactions and the control schemes it belongs to, and it is the unit a rebinding operation replaces.

Interactions are per binding, not per action. An action bound to both a tap and a hold has to be able to have each half-way through its own pattern at the same time, which a single state machine on the action cannot represent.

Fields and properties (13)

  • public InputBindingData Data

    What the asset said.

  • public InputAction Action

    The action this belongs to.

  • public InputCompositeKind Composite

    Which composite this is, or None.

  • public bool IsComposite

    Whether this binding is a composite of parts.

  • public IReadOnlyList<InputBindingPart> Parts

    Its parts, empty unless it is a composite.

  • public IReadOnlyList<IInputProcessor> Processors

    Its processors.

  • public IReadOnlyList<IInputInteraction> Interactions

    Its interactions, or empty for the default press behaviour.

  • public IReadOnlyList<string> Groups

    The control schemes it belongs to, or empty for "all of them".

  • public string? OverridePath

    The path the player rebound this to, or .

  • public string EffectivePath

    The path in force.

  • public InputControl Control

    The control it reads, or the horizontal half of a two-dimensional one.

  • public InputControl ControlY

    The vertical half, or None.

  • public bool IsResolved

    Whether the binding resolved to anything this build can read.

Methods (3)

  • public bool BelongsTo(string? scheme)

    Whether this binding is active under a control scheme.

  • public void CollectDevices(List<InputDeviceKind> into)

    Which families of device this binding reads.

  • public void CollectControls(List<InputControl> into)

    Every control this binding reads, for conflict detection.

Used by (5)

  • ActionPlayerInputVixen.Engine
  • InputActionVixen.Input
  • InputActionContextVixen.Input
  • InputActionsVixen.Input
  • InputRebindingTestsVixen.Input.Tests