SetSharedComponentFilter
Filters this EntityQuery so that it only selects entities with shared component of type SharedComponent equal to sharedComponent.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
SetSharedComponentFilter<T>(T)
Filters this EntityQuery so that it only selects entities with shared component of type equal to .
SharedComponentsharedComponentpublic void SetSharedComponentFilter<SharedComponent>(SharedComponent sharedComponent) where SharedComponent : unmanaged, ISharedComponentData
Parameters
Remarks
This call disables any existing chunk filtering on this query. For additive filtering, use EntityQuery.AddSharedComponentFilter.
SetSharedComponentFilter<T, U>(T, T)
Filters this EntityQuery based on the values of two separate unmanaged shared components.
public void SetSharedComponentFilter<SharedComponent1, SharedComponent2>(SharedComponent1 sharedComponent1, SharedComponent2 sharedComponent2) where SharedComponent1 : unmanaged, ISharedComponentData where SharedComponent2 : unmanaged, ISharedComponentData
Parameters
Remarks
The filter only selects entities which have both a shared component of type whose value equals and a shared component of type whose value equals . This call disables any existing chunk filtering on this query. For additive filtering, use EntityQuery.AddSharedComponentFilter.
SharedComponent1sharedComponent1SharedComponent2sharedComponent2