Replies: 2 comments 4 replies
-
You can assign a name as a component and implement uniqueness testing upon every component assignment. |
Beta Was this translation helpful? Give feedback.
-
It's not that common actually but there is nothing wrong. Though, a registry is an entity-to-component mapping while what you want is a name-to-entity mapping, that is exactly the opposite. 🙂 |
Beta Was this translation helpful? Give feedback.
-
When creating an editor for a scene view it is helpful to give entities human readable and unique names.
How would I implement such a feature using
entt
? Or is that something that has nothing to do with theentt::registry
but rather a e.g.std::unordered_map<std::string, entt::entity>
that maps entities to names.Though this has the disadvantage of having to manage an entity in two seperate places.
Beta Was this translation helpful? Give feedback.
All reactions