Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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.

minCommandsPerJob

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

maxHits

The maximum number of Colliders the BoxCast can hit.

dependsOn

A JobHandle of a job that must be completed before performing the box casts.

Returns

Type

Description

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

minCommandsPerJob

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

dependsOn

A JobHandle of a job that must be completed before performing the box casts.

Returns

Type

Description

JobHandleReturns a JobHandle of the job that will perform the box casts.

Remarks

By default maxHits in this variant is set to 1.