Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


ScheduleConstruct

Creates and schedules a job to allocate a new stream.
Read time 2 minutesLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

ScheduleConstruct<T>(NativeStream, NativeList<T>, JobHandle, AllocatorHandle)

Creates and schedules a job to allocate a new stream.
public static JobHandle ScheduleConstruct<T>(out NativeStream stream, NativeList<T> bufferCount, JobHandle dependency, AllocatorManager.AllocatorHandle allocator) where T : unmanaged

Parameters

Outputs the new stream.

bufferCount

A list whose length determines the number of buffers in the stream.

dependency

A job handle. The new job will depend upon this handle.

The allocator to use.

Returns

Type

Description

JobHandleThe handle of the new job.

Remarks

The stream can be used on the main thread after completing the returned job or used in other jobs that depend upon the returned job.
Using a job to allocate the buffers can be more efficient, particularly for a stream with many buffers.

ScheduleConstruct(NativeStream, NativeArray<int>, JobHandle, AllocatorHandle)

Creates and schedules a job to allocate a new stream.
public static JobHandle ScheduleConstruct(out NativeStream stream, NativeArray<int> bufferCount, JobHandle dependency, AllocatorManager.AllocatorHandle allocator)

Parameters

Outputs the new stream.

bufferCount

An array whose value at index 0 determines the number of buffers in the stream.

dependency

A job handle. The new job will depend upon this handle.

The allocator to use.

Returns

Type

Description

JobHandleThe handle of the new job.

Remarks

The stream can be used...
  • after completing the returned job
  • or in other jobs that depend upon the returned job.
Allocating the buffers in a job can be more efficient, particularly for a stream with many buffers.

ScheduleConstruct(NativeStream, NativeReference<int>, JobHandle, AllocatorHandle)

Creates and schedules a job to allocate a new stream.
public static JobHandle ScheduleConstruct(out NativeStream stream, NativeReference<int> bufferCount, JobHandle dependency, AllocatorManager.AllocatorHandle allocator)

Parameters

Outputs the new stream.

The number of buffers in the stream.

dependency

A job handle. The new job will depend upon this handle.

The allocator to use.

Returns

Type

Description

JobHandleThe handle of the new job.

Remarks

The stream can be used...
  • after completing the returned job
  • or in other jobs that depend upon the returned job.
Allocating the buffers in a job can be more efficient, particularly for a stream with many buffers.