# WithAnyRW<T1>()

> Add optional component types to the query with ReadWrite mode.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## WithAnyRW\<T>()

```csharp
public EntityQueryBuilder WithAnyRW<T1>()
```

### Returns

| Type                                                                                       | Description                                  |
| ------------------------------------------------------------------------------------------ | -------------------------------------------- |
| [EntityQueryBuilder](/engine/7000.0/script-reference/unity/entities/entityquerybuilder.md) | The builder object that invoked this method. |

### Remarks

If a query uses the [EntityQueryOptions.FilterWriteGroup](/engine/7000.0/script-reference/unity/entities/entityqueryoptions/filterwritegroup.md) option, you must use WithAnyRW to specify the query's writeable optional components. Refer to the write groups guide for more information.

WithAny@@@@1 assumes the component type is read-only.

To match the resulting query, an Entity must have all of the query's optional component types.

WithAnyRW accepts up to two type arguments. You can add more component types by chaining calls together.

In the following example, an Entity must have either a Scale, NonUniformScale, and/or CompositeScale component in order to match the query:

To request read-only access, use EntityQueryBuilder.WithAny@@\<c>1(\</c>@@0)
