Interactions

Custom Unity Input System interactions that extend the default input processing behavior. Interactions modify how input actions transition between phases (Started → Performed → Canceled), enabling patterns not covered by Unity's built-in interactions.

Classes

Class
Description

Fires Performed every frame while the control is actuated, enabling continuous per-frame input reading

How Interactions Work

Unity's Input System processes input through a phase state machine:

spinner

The default behavior transitions Performed → Waiting after each trigger. ContinuousInteraction overrides this by calling PerformedAndStayPerformed(), keeping the action in Performed phase every frame until the control is released.

Registration

Interactions are registered with Unity's Input System via the static constructor and [InitializeOnLoad] / [RuntimeInitializeOnLoad] attributes. This ensures they are available both in the Editor and at runtime without manual setup.

See Also

Last updated