Search Unity

Feedback Why chunk component data doesn't use specific interface?

Discussion in 'Entity Component System' started by RamType0, Dec 21, 2020.

  1. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    When we working with chunk component data, it is defined with exactly same interface with general data, IComponentData.
    But it behaves completely different with general data, and confusing them will be resulted in unexpected behaviour.
    Assigning specific interface, such as IChunkComponentData seems to be better.
     
  2. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    679
    They don't behave differently at all, the only difference here is that you either attach it to an Entity or to a Chunk.