-
Hello All, I have the following general (opinion-based perhaps?) question: What's do you think is best approach to delete entities not being used from the registry? The options I see:
Thanks in Advanced, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
My personal choice is for the second option, that is, marking entities with a dedicated component. By far better than anything else imho. |
Beta Was this translation helpful? Give feedback.
-
Hey, thanks skypjack for your answer. Regarding the issue with checking before hand if a entity is being used in the registry before attempting to destroy it: Is there any function on entt that one could use to do so? |
Beta Was this translation helpful? Give feedback.
My personal choice is for the second option, that is, marking entities with a dedicated component. By far better than anything else imho.
As a bonus point, it also has an optimized path if you pass the view iterators to the destroy function directly. So... 🙂