Class InputDeviceChangedEvent
Published via the Scylla Event eXchange System (SEX) when the most recently used input device changes, for example when a player switches from keyboard to a gamepad mid-session.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public class InputDeviceChangedEvent : ScyllaEvent
Remarks
This event is driven by activity detection, not physical connection changes. It fires whenever the input system observes that a different device produced input more recently than the previously tracked device. It does not fire when a device is merely connected or disconnected without generating input.
Subscribe via ScyllaEvents.Listen<InputDeviceChangedEvent>.
For control-scheme-aware reactions (such as updating button-prompt icons),
prefer subscribing to ControlSchemeChangedEvent instead, which
maps device activity to high-level scheme categories.
Properties
CurrentDevice
Gets or sets the Unity Input System device that is now the most recently used. This is the device whose activity triggered the event.
Declaration
public InputDevice CurrentDevice { get; set; }
Property Value
| Type | Description |
|---|---|
| InputDevice |
CurrentDeviceType
Gets or sets the Scylla-classified device type of CurrentDevice.
Declaration
public InputDeviceType CurrentDeviceType { get; set; }
Property Value
| Type | Description |
|---|---|
| InputDeviceType |
PreviousDevice
Gets or sets the Unity Input System device that was active before the switch,
or null if no device was considered active at the time of the change.
Declaration
public InputDevice PreviousDevice { get; set; }
Property Value
| Type | Description |
|---|---|
| InputDevice |
PreviousDeviceType
Gets or sets the Scylla-classified device type of PreviousDevice.
Will be Unknown when PreviousDevice
is null.
Declaration
public InputDeviceType PreviousDeviceType { get; set; }
Property Value
| Type | Description |
|---|---|
| InputDeviceType |