-
Hi, Could someone please point me in the right direction for creating an entity with a composition of sprites instead of just one ColorMaterial? I'm wondering if it would be possible to change the composition of the sprites dynamically based on the state of an entity, such as when it is selected or hovered over, etc. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Make each sprite its own entity so each can have their ColorMaterial and so on. But have a root entity holding everything together by making each sprite a child of the parent entity. Later you can access each child sprite with a query when you know the entity. I sometimes use marker components for each child or like in the example below a component holding the Entity handles to each sprite in the composition. Example:
|
Beta Was this translation helpful? Give feedback.
Make each sprite its own entity so each can have their ColorMaterial and so on. But have a root entity holding everything together by making each sprite a child of the parent entity.
Later you can access each child sprite with a query when you know the entity. I sometimes use marker components for each child or like in the example below a component holding the Entity handles to each sprite in the composition.
Example: