Method SetSharedComponentFilter
SetSharedComponentFilter<SharedComponent1>(SharedComponent1)
Filters this EntityQuery so that it only selects entities with shared component values
matching the values specified by the sharedComponent1
parameter.
Declaration
[NotBurstCompatible]
public void SetSharedComponentFilter<SharedComponent1>(SharedComponent1 sharedComponent1)
where SharedComponent1 : struct, ISharedComponentData
Parameters
Type | Name | Description |
---|---|---|
SharedComponent1 | sharedComponent1 | The shared component values on which to filter. |
Type Parameters
Name | Description |
---|---|
SharedComponent1 | The type of shared component. (The type must also be one of the types used to create the EntityQuery. |
SetSharedComponentFilter<SharedComponent1, SharedComponent2>(SharedComponent1, SharedComponent2)
Filters this EntityQuery based on the values of two separate shared components.
Declaration
[NotBurstCompatible]
public void SetSharedComponentFilter<SharedComponent1, SharedComponent2>(SharedComponent1 sharedComponent1, SharedComponent2 sharedComponent2)
where SharedComponent1 : struct, ISharedComponentData where SharedComponent2 : struct, ISharedComponentData
Parameters
Type | Name | Description |
---|---|---|
SharedComponent1 | sharedComponent1 | Shared component values on which to filter. |
SharedComponent2 | sharedComponent2 | Shared component values on which to filter. |
Type Parameters
Name | Description |
---|---|
SharedComponent1 | The type of shared component. (The type must also be one of the types used to create the EntityQuery. |
SharedComponent2 | The type of shared component. (The type must also be one of the types used to create the EntityQuery. |
Remarks
The filter only selects entities for which both shared component values
specified by the sharedComponent1
and sharedComponent2
parameters match.