Interaction
Pressed
Hovered
None
Description
Describes what type of input interaction has occurred for a UI node.
This is commonly queried with a
Changed<Interaction>
filter.Updated in [
ui_focus_system
].If a UI node has both [
Interaction
] and [ViewVisibility
] components, [Interaction
] will always be [Interaction::None
] when [ViewVisibility::get()
] is false. This ensures that hidden UI nodes are not interactable, and do not end up stuck in an active state if hidden at the wrong time.Note that you can also control the visibility of a node using the
Display
property, which fully collapses it during layout calculations.See also
Button
which requires this component- [
RelativeCursorPosition
] to obtain the position of the cursor relative to current node