Duplicating all of an entity's components #684
Replies: 2 comments 9 replies
-
So, am I saying there is no solution for this? Quite the opposite. 🙂
Most likely, I'll provide some pre-cooked implementations in future. Though, I'm currently working on other things because of my job, so consider this a low prio task at the moment. |
Beta Was this translation helpful? Give feedback.
-
Is there an updated version of the example you linked above? It appears that as of EnTT3.9 poly storage has been fully removed... |
Beta Was this translation helpful? Give feedback.
-
The straight forward way of doing this would be to check if the entity has the component, then if so get it and copy all it's members into a new component. The issue with this way of duplicating an entity's components is that it could require a mountain of code to be written depending on how many different components could be used. Is there a better alternative for duplicating an entity's components? If not what is the best way to manage such an issue?
Beta Was this translation helpful? Give feedback.
All reactions