Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback [0.0.7-preview.12] IJobParallelForDeferred, what does it do?

Discussion in 'Entity Component System' started by Xerioz, May 17, 2019.

  1. Xerioz

    Xerioz

    Joined:
    Aug 13, 2013
    Posts:
    104
    I have a feeling that the one who wrote the changelog had a slight stroke when writing it, because I have no idea what the following means:

    * IJobParallelForDeferred has been added to allow a parallel for job to be scheduled even if it's for each count will only be known during another jobs execution. 


    Could someone explain this?
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,753
    If you're populating a list with 1 job and use the list in the next job you don't know the length of the list until after the first job runs.

    To solve this NativeList has an .AsDeferredJobArray() method
     
    Xerioz likes this.