WithPresentRW<T1>()
Add required component types to the query with ReadWrite mode, whether they are enabled or disabled.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: Unity.Entities
- Assembly: UnityEngine.EntitiesModule
WithPresentRW<T>()
public EntityQueryBuilder WithPresentRW<T1>()
Returns
Type | Description |
|---|---|
| EntityQueryBuilder | The builder object that invoked this method. |
Remarks
If a query uses the EntityQueryOptions.FilterWriteGroup option, you must use WithPresentRW to specify the query's writeable required components. Refer to the write groups guide for more information.
To match the resulting query, an Entity must have all of the query's required component types, regardless of whether they are enabled or disabled. To match required types only if they're enabled, use WithAllRW@@@@1. To match required types only if they're disabled, use WithDisabledRW@@@@1.
WithPresentRW accepts up to two type arguments. You can add more component types by chaining calls together.
To request read-only access to the reference component(s), use EntityQueryBuilder.WithPresent@@<c>1(</c>@@0)