Search Unity

ArchetypeChunks and non-ECS components

Discussion in 'Entity Component System' started by jeremies_unity, Jan 22, 2019.

  1. jeremies_unity

    jeremies_unity

    Joined:
    Oct 16, 2018
    Posts:
    26
    I haven't found an example/API for working with non-ECS components and chunk iteration.

    Previously I used ComponentArray for things like Rigidbody, Animator, etc. without chunk iteration. What would be the equivalent with chunks?
     
  2. NoDumbQuestion

    NoDumbQuestion

    Joined:
    Nov 10, 2017
    Posts:
    186
    I didn't know you can do chunk with hybrid component.

    But you can chunk get
    GetNativeArray()
    from chunk then use EntityManager to get component from it. Not optimal but is this what you want?