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 QueryEnumerable<T1, T2> WithSharedComponentFilter<TSharedComponent1>(TSharedComponent1 sharedComponent) where TSharedComponent1 : unmanaged, ISharedComponentData
Parameters
Returns
Type | Description |
|---|---|
| QueryEnumerable<T, U> | QueryEnumerable, which allows enumerating over all RefRO, RefRW, EnabledRefRO and EnabledRefRW components that match the constructed Query. |
WithSharedComponentFilter<T, U>(T, T)
Only select chunks that have the specified values for two shared components.
public QueryEnumerable<T1, T2> WithSharedComponentFilter<TSharedComponent1, TSharedComponent2>(TSharedComponent1 sharedComponent1, TSharedComponent2 sharedComponent2) where TSharedComponent1 : unmanaged, ISharedComponentData where TSharedComponent2 : unmanaged, ISharedComponentData
Parameters
Returns
Type | Description |
|---|---|
| QueryEnumerable<T, U> | QueryEnumerable, which allows enumerating over all RefRO, RefRW, EnabledRefRO and EnabledRefRW components that match the constructed Query. |