Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

UnsafeStream.ScheduleConstruct

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static JobHandle ScheduleConstruct(out UnsafeStream stream, NativeList<T> bufferCount, JobHandle dependency, AllocatorHandle allocator);

Parameters

Parameter Description
stream 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.
allocator The allocator to use.

Returns

JobHandle The handle of the new job.

Description

Creates and schedules a job to allocate a new stream.

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.


Declaration

public static JobHandle ScheduleConstruct(out UnsafeStream stream, NativeArray<int> bufferCount, JobHandle dependency, AllocatorHandle allocator);

Parameters

Parameter Description
stream 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.
allocator The allocator to use.

Returns

JobHandle The handle of the new job.

Description

Creates and schedules a job to allocate a new stream.

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.

Allocating the buffers in a job can be more efficient, particularly for a stream with many buffers.