# ScheduleBatch(NativeArray<ClosestPointCommand>, NativeArray<Vector3>, int, JobHandle)

> Schedule a batch of closest points which are performed in a job.

## Definition

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

```csharp
public static JobHandle ScheduleBatch(NativeArray<ClosestPointCommand> commands, NativeArray<Vector3> results, int minCommandsPerJob, JobHandle dependsOn = default)
```

### Parameters

**** (\[NativeArray\<ClosestPointCommand>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): A NativeArray of the ClosestPointCommands to perform.**** (\[NativeArray\<Vector3>]\(/engine/6000.0/script-reference/unity/collections/nativearray1)): A NativeArray of the Vector3 where the results of the commands are stored.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The minimum number of jobs which should be performed in a single job.**** (\[JobHandle]\(/engine/6000.0/script-reference/unity/jobs/jobhandle)): A JobHandle of a job which must be completed before the closest point starts.

### Returns

| Type                                                                 | Description                                                        |
| -------------------------------------------------------------------- | ------------------------------------------------------------------ |
| [JobHandle](/engine/6000.0/script-reference/unity/jobs/jobhandle.md) | The JobHandle of the job that performs the closest point commands. |
