Getting value of component in Query #44
Unanswered
MorganeLeCaignec
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is it possible to check/filter for a specific value in a Query?
I might be approaching this wrong, but I have a component that references the ID of another entity, so I can "link" an entity to another or at least have a reference to another entity.
In my system, I'd like to get an entity that contains a component "Location", this component contains an ID referencing another entity's component (for example entity A with component Location.ID = "place-1" is contained within entity B with component Place of ID "place-1"), and I would like to filter for this.
In my example, I want to grab all entities that have components referencing a specific entity+component, basically get all things that are contained within a specific entity.
Maybe this is not the right approach for ECS? Is there a cleaner way to have components link to or reference other components so I can easily grab one from the other?
All reactions