Search Unity

Can ECS work with component hierarchies?

Discussion in 'Entity Component System' started by Arowx, Jun 25, 2018.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    One of the good things with classical Unity is it's transforms and their ability to have a hierarchy of components and sub-components does Pure ECS have any kind of hierarchy features or is it better to use transforms?
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,684
    You can setup hierarchy manually.
     
  3. dartriminis

    dartriminis

    Joined:
    Feb 3, 2017
    Posts:
    157
    You can use IComponentData, ISharedComponentData, and FixedArray to store Entities, giving you the ability to create hierarchies in different ways depending on your needs. You can look at Unity.Transforms namespace as an example, as I believe they implemented hierarchies in there with the TransformParent component.