Accessing entity by String identifiers #13585
-
I'm considering using bevy_ecs for a project, and would like to access entities by a String ID (as entities will come from the outside with their String identifiers). Is there any idiomatic way to do this using bevy or do I need to maintain my own entity dictionary? |
Beta Was this translation helpful? Give feedback.
Answered by
alice-i-cecile
May 30, 2024
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jeteve
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Name
component in bevy_core is the standard way to do this :) You'll have to maintain your own dictionary/index though if you want to look up entities by name.