Class ControlSchemeChangedEvent
Published via the Scylla Event eXchange System (SEX) when the active control scheme changes, for example when the player switches from keyboard and mouse to a gamepad.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public class ControlSchemeChangedEvent : ScyllaEvent
Remarks
This event is the primary signal for UI systems that need to swap button-prompt icons between device families. When this event fires the InputHintsManager automatically invalidates its hint cache so that subsequent calls to IInputHintsManager.GetHint(string) will return hints appropriate for the new scheme.
Subscribe via ScyllaEvents.Listen<ControlSchemeChangedEvent>.
Both the previous and current ControlScheme objects are provided so
subscribers do not need to query IControlSchemeManager separately.
Properties
CurrentScheme
Gets or sets the ControlScheme that is now active.
Declaration
public ControlScheme CurrentScheme { get; set; }
Property Value
| Type | Description |
|---|---|
| ControlScheme |
CurrentType
Gets or sets the ControlSchemeType of the current scheme.
Declaration
public ControlSchemeType CurrentType { get; set; }
Property Value
| Type | Description |
|---|---|
| ControlSchemeType |
PreviousScheme
Gets or sets the ControlScheme that was active before the change,
or null if no scheme was previously active.
Declaration
public ControlScheme PreviousScheme { get; set; }
Property Value
| Type | Description |
|---|---|
| ControlScheme |
PreviousType
Gets or sets the ControlSchemeType of the previous scheme.
Will be Unknown when PreviousScheme
is null.
Declaration
public ControlSchemeType PreviousType { get; set; }
Property Value
| Type | Description |
|---|---|
| ControlSchemeType |
TriggeringDevice
Gets or sets the Unity Input System device whose activity triggered the scheme
change, or null if the change was initiated programmatically via
SetActiveScheme(string).
Declaration
public InputDevice TriggeringDevice { get; set; }
Property Value
| Type | Description |
|---|---|
| InputDevice |