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.
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 asPlayer
rather thanEntity (4)
.I tried adding
#[derive(Reflect)]
and#[reflect(Component)]
to the component, but it doesn't seem to work. It seems likeText
andcamera_2d
components are labelled correctly but I'm not sure how to do so for custom components.