/// <summary> /// Schedule job to construct a new NativeStream using the specified type of memory allocation. /// </summary> /// <param name="dependency">All jobs spawned will depend on this JobHandle.</param> /// <param name="allocator">A member of the /// [Unity.Collections.Allocator](https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html) enumeration.</param> public static JobHandle ScheduleConstruct <T>(out NativeStream stream, NativeList <T> forEachCountFromList, JobHandle dependency, Allocator allocator) where T : struct { AllocateBlock(out stream, allocator); var jobData = new ConstructJobList <T> { List = forEachCountFromList, Container = stream }; return(jobData.Schedule(dependency)); }
public static JobHandle ScheduleConstruct <T>(out BlockStream blockStream, NativeList <T> forEachCountFromList, uint uniqueBlockStreamId, JobHandle dependency, Allocator allocator = Allocator.TempJob) where T : struct { AllocateBlock(out blockStream, uniqueBlockStreamId, allocator); var jobData = new ConstructJobList <T> { List = forEachCountFromList, BlockStream = blockStream }; return(jobData.Schedule(dependency)); }