8000 Add Ability to Retrieve All Entities · Issue #163 · dominion-dev/dominion-ecs-java · GitHub
[go: up one dir, main page]

Skip to content

Add Ability to Retrieve All Entities #163

Closed

Description

@KShizuko

Description

Would it be possible to add an option to the API to retrieve all entities?

I am currently using a workaround where I add a dummy component to all entities and then just do:

dominion.findEntitiesWith(FillerComponent.class).iterator();

And then just iterate through it to get a list of all my entities, while it works, it would be nicer if I did not have to add a dummy component.

Use case

I wanted to fetch all entities for a debug menu so that I could implement a GUI where I can just click to select an entity from the list to add or remove a component from UI during testing. This is a lot faster than having to make all component changes programmatically.

Activity

  1. added a commit that references this issue on Jun 26, 2023
  2. enricostara commented on Jun 26, 2023

    @enricostara
    Contributor

    Hi @Kureika ,
    please check new Dominion.findAllEntities and let me know

  3. enricostara commented on Jun 27, 2023

    @enricostara
    Contributor

    This change was included in the new RC2

  4. KShizuko commented on Jun 27, 2023

    @KShizuko
    Author

    Apologies about the delay, I started testing it yesterday but I was having some really odd problems and I was not sure if it was just me or a bug, I am still not sure as I have not had the time to check it today.

    For reference, I was just replacing instances of dominion.findEntitiesWith(FillerComponent.class).iterator(); with dominion.findAllEntities().iterator(); on the assumption it would give me the exact same results, and it even works for most of my test scenes, just that for 1 particular scene it only returns 3 out 5 entities and I am trying to figure out if I have a bug somewhere.

    I reckon your changes are fine, just that some of my logic is bugged, need to debug it a bit more.

    If it does end up being something with findAllEntities(), I will raise another issue.

  5. enricostara commented on Jun 28, 2023

    @enricostara
    Contributor

    Thanks a lot for your feedback! Let me know and yes, please rise a new issue if you feel something is still wrong ☺️

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0