Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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.

minCommandsPerJob

The minimum number of commands to perform in a single job.

maxHits

The maximum number of Colliders the CapsuleCast can hit.

dependsOn

A jobHandle of a job that must be completed before performing capsule casts.

Returns

Type

Description

JobHandleReturns 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.

minCommandsPerJob

The minimum number of commands to perform in a single job.

dependsOn

A jobHandle of a job that must be completed before performing capsule casts.

Returns

Type

Description

JobHandleReturns a JobHandle of the job that will performs the capsule casts.

Remarks

By default maxHits in this variant is set to 1.