jakobhellermann / bevy-inspector-egui

Inspector plugin for the bevy game engine
Apache License 2.0
1.19k stars 173 forks source link

Add name to entity based on component #48

Closed tqwewe closed 2 years ago

tqwewe commented 2 years ago

Is there a way I can rename an entity based on it's component? For example, I have an entity with a Player component... I want it to be labelled as Player rather than Entity (4).

I tried adding #[derive(Reflect)] and #[reflect(Component)] to the component, but it doesn't seem to work. It seems like Text and camera_2d components are labelled correctly but I'm not sure how to do so for custom components.

tqwewe commented 2 years ago

I realise I can use the built-in Name component provided by Bevy.