Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Entity index & version

Discussion in 'DOTS Dev Blitz Day 2022 - Q&A' started by Goularou, Dec 7, 2022.

  1. Goularou

    Goularou

    Joined:
    Oct 19, 2018
    Posts:
    54
    My searches on this always lead to the same answer: I just can "hack" access to an entity AND with BOTH the index and the version.
    I have an (native)array of Entities and the room for that is double, because of the version that I do not need.
    Any work around, and/or ideally plans to allow direct access to an entity by its index only?
    Thanks
     
  2. msfredb7

    msfredb7

    Joined:
    Nov 1, 2012
    Posts:
    174
    If I understand what you mean, you'd like to be able to get access to an entity with just the index (ignoring version) to save memory? I'm assuming this is something you'd use only in cases where you know the target entities will not get destroyed?
     
  3. Goularou

    Goularou

    Joined:
    Oct 19, 2018
    Posts:
    54
    YES exactly
     
    msfredb7 likes this.