ScheduleBatch
Schedules a batch of boxcasts to be performed in a job.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
ScheduleBatch(NativeArray<BoxcastCommand>, NativeArray<RaycastHit>, int, int, JobHandle)
Schedules a batch of boxcasts to be performed in a job.
public static JobHandle ScheduleBatch(NativeArray<BoxcastCommand> commands, NativeArray<RaycastHit> results, int minCommandsPerJob, int maxHits, JobHandle dependsOn = default)
Parameters
A NativeArray of the BoxcastCommand to perform.
A NativeArray of RaycastHit where the result of commands are stored.
The minimum number of commands to perform in a single job.
The maximum number of Colliders the BoxCast can hit.
A JobHandle of a job that must be completed before performing the box casts.
Returns
Type | Description |
|---|---|
| JobHandle | Returns a JobHandle of the job that will perform the box casts. |
ScheduleBatch(NativeArray<BoxcastCommand>, NativeArray<RaycastHit>, int, JobHandle)
Schedules a batch of boxcasts to be performed in a job.
public static JobHandle ScheduleBatch(NativeArray<BoxcastCommand> commands, NativeArray<RaycastHit> results, int minCommandsPerJob, JobHandle dependsOn = default)
Parameters
A NativeArray of the BoxcastCommand to perform.
A NativeArray of RaycastHit where the result of commands are stored.
The minimum number of commands to perform in a single job.
A JobHandle of a job that must be completed before performing the box casts.
Returns
Type | Description |
|---|---|
| JobHandle | Returns a JobHandle of the job that will perform the box casts. |
Remarks
By default maxHits in this variant is set to 1.