Search Unity

Store an array in IComponentData

Discussion in 'Entity Component System' started by strexet, Nov 22, 2018.

  1. strexet

    strexet

    Joined:
    Sep 30, 2016
    Posts:
    5
    Hi,
    I am developing little game using Unity ECS in a spare time.

    And I came up with a situation where I need to store an array of Entities or other components in field of another component (derived from IComponentData)... To be clear, I need to update components from that array if the component that contains that array is updated.

    Is there any good working solutions for my situation? Or maybe there is another approach that I can take?

    Sorrry if there was similar question before...
     
  2. Micz84

    Micz84

    Joined:
    Jul 21, 2012
    Posts:
    451
  3. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,778
  4. strexet

    strexet

    Joined:
    Sep 30, 2016
    Posts:
    5
    Thank you so much! I'll check those for sure!