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. Dismiss Notice

Question How to efficiently get created/destroyed chunks ?

Discussion in 'Entity Component System' started by Tony_Max, Oct 21, 2022.

  1. Tony_Max

    Tony_Max

    Joined:
    Feb 7, 2017
    Posts:
    334
    I know there is a way to add chunk components, so I can just check chunk's components state and figure out chunk was created just now. But how to do the same with destroyed chunks?
     
  2. CookieStealer2

    CookieStealer2

    Joined:
    Jun 25, 2018
    Posts:
    119
    I haven't used chunk components, but couldn't you use ICleanupComponentData as chunk component to detect that?
     
  3. Tony_Max

    Tony_Max

    Joined:
    Feb 7, 2017
    Posts:
    334
    Is this something we haven't yet in 0.51.x but have in 1.0 or is it something internal?
     
  4. CookieStealer2

    CookieStealer2

    Joined:
    Jun 25, 2018
    Posts:
    119
    In 0.51 this is ISystemStateComponentData, it was renamed to ICleanupComponentData in 1.0.