Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Removing an ISharedComponentData

Discussion in 'Data Oriented Technology Stack' started by orionburcham, Jan 26, 2019.

  1. orionburcham

    orionburcham

    Joined:
    Jan 31, 2010
    Posts:
    491
    Can
    EntityManager.RemoveComponent()
    and
    EntityCommandBuffer.RemoveComponent()
    be used to remove an ISharedComponentData?

    I am looking to move a single entity from an archetype chunk with an ISharedComponentData, to a chuck with the exact same component layout, minus that ISharedComponentData.

    I am *not* looking to change or remove the ISharedComponentData from all entities that currently have it.

    Thanks!
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,862
    Not sure about ecb as I've never tried, it probably does, but the regular remove component definitely works.
     
    orionburcham likes this.
  3. orionburcham

    orionburcham

    Joined:
    Jan 31, 2010
    Posts:
    491
    Much obliged!