Search Unity

Job system - boid question

Discussion in 'Data Oriented Technology Stack' started by PatHightree, Feb 19, 2018.

  1. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    259
    The job system works great for situations where the same task is performed on many items.
    But how to apply this system when a job has multiple outputs ?
    I'm working on a boid system and would like to add spatial hashing, but I'm having trouble getting my head around that.
    I've got a job that writes each boid's position hash to a NativeArray, but how to collect these into buckets ?
    It would mean that the job would process each boid and write its position somewhere at an arbitrary location of another array? That sounds like job-system-heresy.
    Are slices the answer here ?

    Thanks in advance, Patrick

    P.S.
    Where can one find the best reading material regarding the job system ??
     
  2. MartinGram

    MartinGram

    Unity Technologies

    Joined:
    Feb 24, 2017
    Posts:
    41
    Hello Patrick,

    Reading material on the job system and ECS will be released soon. Also included in that package will be a sample that shows how to solve what you are asking.
     
  3. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    259
    Awesome, can't wait!
    Possible to give an ETA more specific than Soon™ ?
     
  4. MartinGram

    MartinGram

    Unity Technologies

    Joined:
    Feb 24, 2017
    Posts:
    41
    I want to, believe me I do. But there are a few issues left to fix before we can let it go public. Before we have them nailed, providing a date is just asking to be proved wrong. :)
     
    Krajca likes this.
  5. PatHightree

    PatHightree

    Joined:
    Aug 18, 2009
    Posts:
    259
    Gotcha, thanks for clarifying