Version: Unity 7.0 Alpha (7000.0)
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.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961