Crate bevy_picking_ui

Source
Expand description

A picking backend for bevy_ui.

§Usage

This backend does not require markers on cameras or entities to function. It will look for any pointers using the same render target as the UI camera, and run hit tests on the UI node tree.

§Important Note

This backend completely ignores FocusPolicy. The design of bevy ui’s focus systems and the picking plugin are not compatible. Instead, use the Pickable component to customize how an entity responds to picking focus.

§Implementation Notes

  • Bevy ui can only render to the primary window
  • Bevy ui can render on any camera with a flag, it is special, and is not tied to a particular camera.
  • To correctly sort picks, the order of bevy UI is set to be the camera order plus 0.5.

Modules§

prelude
Commonly used imports for the bevy_picking_ui crate.

Structs§

BevyUiBackend
Adds picking support for bevy_ui.
NodeQuery
Main query from bevy’s ui_focus_system
NodeQueryItem
Automatically generated [WorldQuery] item type for NodeQuery, returned when iterating over query results.
NodeQueryReadOnly
Automatically generated [WorldQuery] type for a read-only variant of NodeQuery.
NodeQueryReadOnlyItem
Automatically generated [WorldQuery] item type for NodeQueryReadOnly, returned when iterating over query results.

Functions§

ui_picking
Computes the UI node entities under each pointer.