Method SetSharedComponentFilter
SetSharedComponentFilter<SharedComponent>(SharedComponent)
Filters this EntityQuery so that it only selects entities with shared component of type SharedComponent
equal to sharedComponent
.
Declaration
public void SetSharedComponentFilter<SharedComponent>(SharedComponent sharedComponent) where SharedComponent : unmanaged, ISharedComponentData
Parameters
Type | Name | Description |
---|---|---|
SharedComponent | sharedComponent | The shared component value to filter. |
Type Parameters
Name | Description |
---|---|
SharedComponent | The type of unmanaged shared component. This type must also be one of the types used to create the EntityQuery. |
Remarks
This call disables any existing chunk filtering on this query. For additive filtering, use AddSharedComponentFilter<SharedComponent>(SharedComponent).
SetSharedComponentFilter<SharedComponent1, SharedComponent2>(SharedComponent1, SharedComponent2)
Filters this EntityQuery based on the values of two separate unmanaged shared components.
Declaration
public void SetSharedComponentFilter<SharedComponent1, SharedComponent2>(SharedComponent1 sharedComponent1, SharedComponent2 sharedComponent2) where SharedComponent1 : unmanaged, ISharedComponentData where SharedComponent2 : unmanaged, ISharedComponentData
Parameters
Type | Name | Description |
---|---|---|
SharedComponent1 | sharedComponent1 | Shared component value to filter. |
SharedComponent2 | sharedComponent2 | Shared component value to filter. |
Type Parameters
Name | Description |
---|---|
SharedComponent1 | The type of shared component. This type must also be one of the types used to create the EntityQuery. |
SharedComponent2 | The type of shared component. This type must also be one of the types used to create the EntityQuery. |
Remarks
The filter only selects entities which have both a shared component of type SharedComponent1
whose value equals sharedComponent1
and a shared component of type
SharedComponent2
whose value equals sharedComponent2
.
This call disables any existing chunk filtering on this query. For additive filtering, use AddSharedComponentFilter<SharedComponent>(SharedComponent).