Roblox UtilitiesDevlHub Roblox Documentation

Class

InputContext

Inherits
Instance › Object
Memory category
Instances

Collection of actions which holds related actions and defines how they interact with other contexts/actions.

An InputContext is a collection of actions which holds related InputActions and defines how they interact with other contexts and actions. Nested InputContext instances will have no effect and ordering/priority is managed through Enabled, Priority, and Sink.

Properties 3#

EnabledbooleanDetermines if this InputContext is enabled or not.ReadSafe
PriorityintThe priority level at which the context should be run.ReadSafe
SinkbooleanDetermines whether input bindings of lower priority will be processed.ReadSafe

Enabled: boolean#

ReadSafe

Determines if this InputContext is enabled or not. When false, all of the descendant actions of the context do not receive any signals except when Enabled is toggled from true to false, in which case a final "end" signal is triggered if a key is pressed or a two-directional input is not zero.

Priority: int#

ReadSafe

The priority level at which the context should be run (higher priority InputContext instances run before lower ones).

Sink: boolean#

ReadSafe

When Sink is set to true, inputs will not be processed for connected InputAction bindings within contexts of lower Priority. Contexts with the same priority will receive the input.

For example, if multiple contexts contain an InputAction with a binding to KeyCode.E and a higher priority context has Sink set to true, the lower priority contexts will not receive the input signal for KeyCode.E and will fire no events for it.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed