# RunReadOnly<T>(T, TransformAccessArray)

> Runs an IJobParallelForTransform job immediately on the main thread, with read-only access to the transform data.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Jobs](/engine/6000.5/script-reference/unityengine/jobs.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static void RunReadOnly<T>(this T jobData, TransformAccessArray transforms) where T : struct, IJobParallelForTransform
```

### Parameters

**** (T): The job to run.**** (\[TransformAccessArray]\(/engine/6000.5/script-reference/unityengine/jobs/transformaccessarray)): The [TransformAccessArray](/engine/6000.5/script-reference/unityengine/jobs/transformaccessarray.md) to run this job on.

### Remarks

While this method is useful in development or test environments, it is typically a mistake to use it in production; it offers no real benefits over implementing the job code as a simple main-thread function call. To schedule a job to run asynchronously, use [IJobParallelForTransformExtensions.ScheduleReadOnlyByRef](/engine/6000.5/script-reference/unityengine/jobs/ijobparallelfortransformextensions/schedulereadonlybyref.md).

This method assumes the job only requires read-only access to the transform data, and skips any sorting or filtering of the input transforms which would otherwise be necessary for safety purposes. One important consequence is that any null, deleted, or invalid Transforms in the input [TransformAccessArray](/engine/6000.5/script-reference/unityengine/jobs/transformaccessarray.md) will not be filtered out, and are still passed to worker threads for processing. Jobs that use this scheduling mode should therefore use [TransformAccess.isValid](/engine/6000.5/script-reference/unityengine/jobs/transformaccess/isvalid.md) to check whether a specific transform instance is valid before processing its data.

For large job structs, use [IJobParallelForTransformExtensions.RunReadOnlyByRef](/engine/6000.5/script-reference/unityengine/jobs/ijobparallelfortransformextensions/runreadonlybyref.md) to avoid any large pass-by-values.
