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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

New ECS & Entity Hierarchies

Discussion in 'Entity Component System' 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:
    5,203
    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!