Interface IInputContext
Represents an input context that can handle input actions and bindings
public interface IInputContext
Properties
IsActive
Whether this context is currently active
bool IsActive { get; set; }
Property Value
Name
Name of the input context
string Name { get; }
Property Value
Priority
Priority of this context (higher priority contexts are processed first)
int Priority { get; }
Property Value
Methods
AddBinding(InputBinding, Action)
Adds an input binding to this context with synchronous handler
void AddBinding(InputBinding binding, Action handler)
Parameters
binding
InputBindinghandler
Action
AddBinding(InputBinding, Func<Task>)
Adds an input binding to this context
void AddBinding(InputBinding binding, Func<Task> handler)
Parameters
binding
InputBindinghandler
Func<Task>
ClearBindings()
Clears all bindings from this context
void ClearBindings()
ProcessInputAsync(IInputDevice, CancellationToken)
Processes input for this context
Task<bool> ProcessInputAsync(IInputDevice inputDevice, CancellationToken ct = default)
Parameters
inputDevice
IInputDevicect
CancellationToken
Returns
RemoveBinding(InputAction)
Removes an input binding from this context
bool RemoveBinding(InputAction action)
Parameters
action
InputAction