# RunByRef

> 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)

Runs the job immediately on the current thread.

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

### Parameters

**** (T): An [IJobEntity](/engine/7000.0/script-reference/unity/entities/ijobentity.md) instance. In this variant, the jobData is passed by reference, which may be necessary for unusually large job structs.

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

Runs the job immediately on the current thread.

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

### Parameters

**** (T): An [IJobEntity](/engine/7000.0/script-reference/unity/entities/ijobentity.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.
