Skip to content

Getting value of component in Query #35

Description

@MorganeLeCaignec

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions