Search Unity

Feedback Enum component

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

  1. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    Currently ,tag component works as very efficient (doesn't need chunk move) boolean property.
    But sometimes we need to distinguish more than two state.
     
  2. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    From when Tag Component does not trigger chunk move?
    Adding/Removing Tag Component will triggering Chunk move a far as I know.

    And the enum you need can be achieved by ISharedComponentData with an enum field.
     
  3. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    67
    When we trigger tag component altering per EntityQuery, it just triggers altering tag component of the chunk itself.
     
  4. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    Okay, you mean query overload of EnityManager And ECB. I got it.
     
    RamType0 likes this.