WithSharedComponentFilter
Only select chunks that have a specified value for a shared component.
Read time 1 minuteLast updated a day ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
WithSharedComponentFilter<T>(T)
Only select chunks that have a specified value for a shared component.
public QueryEnumerableWithEntity<T1, T2, T3, T4, T5> WithSharedComponentFilter<TSharedComponent1>(TSharedComponent1 sharedComponent) where TSharedComponent1 : struct, ISharedComponentData
Parameters
Returns
Type | Description |
|---|---|
| QueryEnumerableWithEntity<T, U, V, W, X> | QueryEnumerableWithEntity, which allows enumerating over all RefRO, RefRW, components, EnabledRefRO, EnabledRefRW and entities that match the constructed Query. |
WithSharedComponentFilter<T, U>(T, T)
Only select chunks that have the specified values for two shared components.
public QueryEnumerableWithEntity<T1, T2, T3, T4, T5> WithSharedComponentFilter<TSharedComponent1, TSharedComponent2>(TSharedComponent1 sharedComponent1, TSharedComponent2 sharedComponent2) where TSharedComponent1 : struct, ISharedComponentData where TSharedComponent2 : struct, ISharedComponentData
Parameters
Returns
Type | Description |
|---|---|
| QueryEnumerableWithEntity<T, U, V, W, X> | QueryEnumerableWithEntity, which allows enumerating over all RefRO, RefRW, components, EnabledRefRO, EnabledRefRW and entities that match the constructed Query. |