Search Unity

Job System: Are we getting NativeList at GDC?

Discussion in 'C# Job System' started by DreamPower, Mar 17, 2018.

  1. DreamPower

    DreamPower

    Joined:
    Apr 2, 2017
    Posts:
    103
    I've started experimenting with the snazzy new Job System, and my first test was to filter through a mesh finding only the triangles with normals facing a certain direction. Unfortunately, I can't think of a way to compile an arbitrary-size result array with only NativeArrays. Except one: use a result array the full size of the starting array with flags for when an entry isn't facing the direction I want. But it seems to me that going through that list afterwards, taking out the important bits while creating another list that's only the size I need, would combat the performance gains of using the Job System in the first place.

    So thus my question: are we getting NativeList soon? It would totally solve this problem. Or does anybody have any better ideas for how to create a result array smaller than the original list within a job with what we have now?
     
  2. superpig

    superpig

    Drink more water! Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,660
  3. DreamPower

    DreamPower

    Joined:
    Apr 2, 2017
    Posts:
    103
    Aha, everything I need *is* coming with the ECS preview (which was announced as being released during GDC)!

    Thanks, somehow didn't see that thread (or the one it links to) in my search. I fail at searching.
     
    Last edited: Mar 17, 2018
  4. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
  5. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
    JohnHudeski likes this.
  6. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    Thanks. I actually havent touched unity in a while and i do not understand packages. I get so many errors when i open the project
     
  7. DreamPower

    DreamPower

    Joined:
    Apr 2, 2017
    Posts:
    103
    You know how your Unity project has an Assets and Project Settings folder? There is now a third folder in there, "Packages" - if you create a new project with a recent beta, by default it has an empty Manifest.json file in it. Simplified instructions assuming you haven't added/created any other packages: to enable the new preview features in beta 12, copy the linked manifest.json into that folder.
     
  8. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    I was trying to open an existing sample not make a new one
    That folder was already there
    Only beta i see is beta 11
     
  9. LennartJohansen

    LennartJohansen

    Joined:
    Dec 1, 2014
    Posts:
    2,394
  10. JohnHudeski

    JohnHudeski

    Joined:
    Nov 18, 2017
    Posts:
    126
    Thank you so much