Class InputActionCanceledEvent
Published via the Scylla Event eXchange System (SEX) when a registered input action
enters its canceled phase, corresponding to the button-release moment or
when an interaction that was in progress is aborted.
Inherited Members
Namespace: Scylla.Input
Assembly: ScyllaInput.dll
Syntax
public class InputActionCanceledEvent : ScyllaEvent
Remarks
For button actions this fires on the frame the button is released. For hold interactions it fires if the button is released before the hold duration is reached, canceling the in-progress interaction. For value-type actions it fires when the value falls back below the release threshold.
Subscribe via ScyllaEvents.Listen<InputActionCanceledEvent>.
Properties
ActionID
Gets or sets the string identifier of the action that was canceled, as registered
with IInputActionManager. Never null or empty.
Declaration
public string ActionID { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Device
Gets or sets the Unity Input System device that generated the input that caused
the cancellation. May be null if the device could not be determined.
Declaration
public InputDevice Device { get; set; }
Property Value
| Type | Description |
|---|---|
| InputDevice |
Interaction
The kind of interaction that drove this fire.
Declaration
public InputInteractionKind Interaction { get; set; }
Property Value
| Type | Description |
|---|---|
| InputInteractionKind |
Remarks
Default means no interaction was authored on the binding or the action, so Unity's own button behaviour drove it. This is the common case and, being the enum's zero value, is also what an event constructed by hand reports.
Multiple never appears here. An action that declares two interactions still fires through exactly one of them, and Unity has already decided which by the time this event is published, so a subscriber switching on this value does not need a case for it.
An interaction a project registered itself reports Unknown. Use InteractionName to separate two custom interactions from one another.
InteractionName
The registered name of the interaction that drove this fire.
Declaration
public string InteractionName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
The name as it would be authored, so a hold reports "Hold" rather than the
type name. Never null: a fire with no interaction reports
NAME_DEFAULT.
MapID
Gets or sets the string identifier of the action map that contains this action.
Declaration
public string MapID { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Time
Gets or sets the timestamp (in seconds, Input System clock) at which the action
entered its canceled phase. Sourced from
InputAction.CallbackContext.time.
Declaration
public double Time { get; set; }
Property Value
| Type | Description |
|---|---|
| double |