Search Unity

Equivalent of Schedule(NativeList<T> list, int innerloopBatchCount, JobHandle dependsOn)

Discussion in 'Data Oriented Technology Stack' started by torano, Aug 15, 2019.

  1. torano

    torano

    Joined:
    Apr 7, 2017
    Posts:
    27
    I saw samples using the parallel job extension method Schedule(NativeList<T> list, int innerloopBatchCount, JobHandle dependsOn) in early time, like the link below.
    https://gist.github.com/tsubaki/5f1b68b0ddfb3fc948078d280773b928
    but it seems that the method was removed at some point. Why? Is there any equivalent for that? Or can I make a custom schedule method which acts like the removed method?

    What I want is to take a part of items in NativeArray, and put it into NativeQueue in IJobParallelFor using NativeQueue<T>.ParallelWriter, then dequeue it and put it into NativeList in Job, and lastly iterate through the list in IJobParallelFor using NativeList.AsDeferredJobArray(). I want the number of the iteration to be the size of the NativeList since the size of the first array is pretty big to iterate, but I can't do that currently because the function was deleted.
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    1,559
    It still exists it has just been renamed. Use the job

    IJobParallelForDefer

    In the Unity.Jobs package.
     
  3. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,274
    New name on the job type. IJobParallelForDefer
     
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    1,369
    IJobParallelForDefer
    Edit: ah late by a second :)
     
  5. torano

    torano

    Joined:
    Apr 7, 2017
    Posts:
    27
    Thanks guys!