bevy-inspector-egui icon indicating copy to clipboard operation
bevy-inspector-egui copied to clipboard

Change Entity with Dropdown selection

Open ItsDoot opened this issue 2 years ago • 2 comments

Currently entities are displayed in either of 2 ways: a label of the ID, or its name and a dropdown of its components. But there isn't a way to change it to point to a different entity.

How feasible would it be to add an entity selection dropdown adjacent to the ID label / component dropdown? Given a production game/app may have thousands or millions of entities, the design should include a way to use Query filters.

ItsDoot avatar Feb 04 '23 22:02 ItsDoot

How about a mode where you can select an entity by searching for its name? It's not as general as a full Query filter, but maybe good enough. Or you could have

struct Data {
  #[inspector(display = EntityDisplay::Select { with_components: vec![TypeId::of<Enemy>()] })
  entity: Entity,
}

and then be able to select one of these entities matching the filtered types.

jakobhellermann avatar Feb 06 '23 16:02 jakobhellermann

For my use case, either of name-based search or that simplified component checking would work fine. 👍

ItsDoot avatar Feb 14 '23 01:02 ItsDoot