# RunByRef<T>(ref T, EntityQuery)

> Runs the job immediately on the current thread.

## Definition

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

## RunByRef\<T>(T, EntityQuery)

```csharp
public static void RunByRef<T>(this ref T jobData, EntityQuery query) where T : struct, IJobChunk
```

### Parameters

**** (T): An [IJobChunk](/engine/7000.0/script-reference/unity/entities/ijobchunk.md) instance. In this variant, the jobData is passed by reference, which may be necessary for unusually large job structs.**** (\[EntityQuery]\(/engine/7000.0/script-reference/unity/entities/entityquery)): The query selecting chunks with the necessary components.
