ScheduleBatch
Schedules a batch of capsule casts to perform in a job.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
ScheduleBatch(NativeArray<CapsulecastCommand>, NativeArray<RaycastHit>, int, int, JobHandle)
Schedules a batch of capsule casts to perform in a job.
public static JobHandle ScheduleBatch(NativeArray<CapsulecastCommand> commands, NativeArray<RaycastHit> results, int minCommandsPerJob, int maxHits, JobHandle dependsOn = default)
Parameters
A NaviveArray of CapsulecastCommands to perform.
A NavtiveArray 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 CapsuleCast can hit.
A jobHandle of a job that must be completed before performing capsule casts.
Returns
Type | Description |
|---|---|
| JobHandle | Returns a JobHandle of the job that will performs the capsule casts. |
ScheduleBatch(NativeArray<CapsulecastCommand>, NativeArray<RaycastHit>, int, JobHandle)
Schedules a batch of capsule casts to perform in a job.
public static JobHandle ScheduleBatch(NativeArray<CapsulecastCommand> commands, NativeArray<RaycastHit> results, int minCommandsPerJob, JobHandle dependsOn = default)
Parameters
A NaviveArray of CapsulecastCommands to perform.
A NavtiveArray 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 capsule casts.
Returns
Type | Description |
|---|---|
| JobHandle | Returns a JobHandle of the job that will performs the capsule casts. |
Remarks
By default maxHits in this variant is set to 1.