Search Unity

Question How to Assigning SharedComponentData in jobs(with ECB) given i have the index of the SCD?

Discussion in 'Entity Component System' started by Eden1230, Jan 22, 2021.

  1. Eden1230

    Eden1230

    Joined:
    Feb 23, 2020
    Posts:
    10
    Assigning SharedComponentData in jobswith EntityCommandBuffer given i have the index of the SharedComponentData
     
  2. Eden1230

    Eden1230

    Joined:
    Feb 23, 2020
    Posts:
    10
    I have restructured my code so that entities get assigned a tag for which sharedcomponent they need. And using
    AddSharedComponentData<T>(EntityQuery, T) to assign the share component data to the entities