Search Unity

New ECS & Entity Hierarchies

Discussion in 'Data Oriented Technology Stack' started by andoowhy, Mar 23, 2018.

  1. andoowhy

    andoowhy

    Joined:
    Dec 26, 2015
    Posts:
    24
    With typical ECS implementations, you only iterate over entities one-at-a-time specified by one Component constraint, and the new Unity ECS follows this tradition.

    While intuitive (and crazy fast if optimized and multi-threaded) this makes working with entity hierarchies difficult: Updating animation transforms or UI element positions, for example, is much harder to express.

    So with the Job System & ECS, what's the best way to work with hierarchies of entities?
     
  2. FastTurtle222

    FastTurtle222

    Joined:
    Dec 24, 2017
    Posts:
    28
    I haven't really looked into them at all but there are things called componentgroups maybe that is what you're looking for?
     
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,721
    We actually have transform hierarchies support. Take a look at the HierarchyExample scene.

    That said, this is just a very early implementation. We have lots of ideas about making hierarchies really fast & easy to express. But for the time being we just have a very simple implementation.
     
  4. andoowhy

    andoowhy

    Joined:
    Dec 26, 2015
    Posts:
    24
    I'll definitely take a look at HierarchyExample, and good to hear you're thinking about it!

    Thanks for the quick reply, too!