Interface IInputListener
Defines a direct-callback interface for objects that need to observe low-level input lifecycle events such as device connections, disconnections, or global input enable/disable.
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public interface IInputListener
Remarks
This interface provides an alternative to subscribing to the Scylla Event eXchange System (SEX) for a small set of structural input events that do not carry per-frame action data. Implement this interface and register the object with ScyllaInput to receive callbacks whenever an InputEventType event occurs.
The OnInputEvent(InputEventType, InputDevice) callback is invoked synchronously on the main thread.
The device argument may be null for events that are not
associated with a specific physical device, such as InputEnabled
or InputDisabled.
For richer action-level events (action started, performed, canceled) or control scheme change notifications, prefer subscribing to the corresponding Scylla.Core.Events.ScyllaEvent-derived types via the SEX system instead.
Methods
OnInputEvent(InputEventType, InputDevice)
Called by the input system whenever a structural input lifecycle event occurs.
Declaration
void OnInputEvent(InputEventType eventType, InputDevice device)
Parameters
| Type | Name | Description |
|---|---|---|
| InputEventType | eventType | The type of input event that occurred. Use this value to determine what state change has taken place, such as a device connecting (DeviceConnected), disconnecting (DeviceDisconnected), the last used device changing (DeviceChanged), or input processing being globally enabled or disabled (InputEnabled / InputDisabled). |
| InputDevice | device | The Unity Input System device associated with the event, or |