# ScheduleBatch(NativeArray<OverlapSphereCommand>, NativeArray<ColliderHit>, int, int, JobHandle)

> Schedule a batch of overlap sphere commands to perform in a job.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.PhysicsModule

```csharp
public static JobHandle ScheduleBatch(NativeArray<OverlapSphereCommand> commands, NativeArray<ColliderHit> results, int minCommandsPerJob, int maxHits, JobHandle dependsOn = default)
```

### Parameters

**** (\[NativeArray\<OverlapSphereCommand>]\(/engine/6000.7/script-reference/unity/collections/nativearray1)): A NativeArray of the OverlapSphereCommands to perform.**** (\[NativeArray\<ColliderHit>]\(/engine/6000.7/script-reference/unity/collections/nativearray1)): A NativeArray of the ColliderHits where the results of the commands are stored.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The minimum number of commands to perform in a single job.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The maximum number of Colliders the overlap can hit.**** (\[JobHandle]\(/engine/6000.7/script-reference/unity/jobs/jobhandle)): A JobHandle of a job which must be completed before the overlap sphere starts.

### Returns

| Type                                                                 | Description                                                     |
| -------------------------------------------------------------------- | --------------------------------------------------------------- |
| [JobHandle](/engine/6000.7/script-reference/unity/jobs/jobhandle.md) | The JobHandle of the job which will perform the overlap sphere. |
