Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Feedback Enum component

Discussion in 'Data Oriented Technology Stack' started by RamType0, Dec 22, 2020.

  1. RamType0

    RamType0

    Joined:
    Sep 11, 2018
    Posts:
    57
    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:
    546
    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:
    57
    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:
    546
    Okay, you mean query overload of EnityManager And ECB. I got it.
     
    RamType0 likes this.