Skip to content
Discussion options

You must be logged in to vote

The Entity id should be the default and preferred choice for referencing entities at runtime, because you get it for free and it is the cheapest and most direct way to access an entity's components. However if you need a "persistent" and a stable id (ex: networking, some types of scenes persisted to disk), a HashMap<MyId, Entity> resource is a perfectly reasonable solution to the problem.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants