Search Unity

suggestion: entity references / entity containers (specialized NativeHashMap<T,Entity>)

Discussion in 'Entity Component System' started by Razmot, May 28, 2019.

  1. Razmot

    Razmot

    Joined:
    Apr 27, 2013
    Posts:
    346
    at the core of my design are

    Code (CSharp):
    1. public NativeHashMap<NodeKey, Entity> Lookup;
    and
    Code (CSharp):
    1.  
    2. public struct North : IComponentData { public Entity E;}
    3. public struct South : IComponentData { public Entity E;}
    4. public struct East : IComponentData { public Entity E; }
    5. public struct West : IComponentData { public Entity E;}
    6.  
    But I'm spending a lot of time ( development time for sure, runtime time probably !) to check if these entities are still valid and to update their values.

    I think the concept of "entity references" should be handled by the DOTS framework and not by the game developers.

    But if someone wants to share a generic solution for that I'm interested :)