Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    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:
    48
    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:
    114
    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:
    48
    YES exactly
     
    msfredb7 likes this.