Setting all SCS of all enitiies.

Just wondering if there is a way to set a SCD value of all the entities in a chunk in one go once, per chunk.

thanks in advance for the help

EntityManager.SetSharedComponentData(EntityQuery, T) ?

https://docs.unity3d.com/Packages/com.unity.entities@0.16/api/Unity.Entities.EntityManager.html#Unity_Entities_EntityManager_SetSharedComponentData__1_Unity_Entities_EntityQuery___0_

This with the entity query
AddSharedComponentFilter(SharedComponent) should allow you to find the expected entities and set the new value I think.

https://docs.unity3d.com/Packages/com.unity.entities@0.16/api/Unity.Entities.EntityQuery.html#Unity_Entities_EntityQuery_AddSharedComponentFilter__1___0_

1 Like

Thank you, for some reason I read the EntityQuery as Entity