Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Did something change wrt NativeList.AsDeferredJobArray() in 2021.2.8 and 2022.1.x?

Discussion in '2022.1 Beta' started by burningmime, Jan 18, 2022.

  1. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845
    I've tracked down a major bug to a NativeArray being empty that is assigned from a NativeList AsDeferredJobArray. This works fine in 2021.2.7, but starting in 2021.2.8 and 2022.x, the array is always empty even though I filled list up in a previous job.

    I can submit a repro but before I do, I want to be sure I'm not missing something fundamental that's changed re: the API
     
  2. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845
    Also, NativeList.AsArray() stopped working for Temp-allocated lists from within jobs (safety check throws exceptions even on calls to GetLength() thinking it's disposed). Not sure if related. Plus, Collections package 1.1.0 is throwing a constant stream of warnings at my console:

    upload_2022-1-18_14-55-40.png

    I feel like there's been some major shifts to collections/native list under the hood in 2021.2.08 which also affects 2022. I *think* I fixed all the crashes in my project, but this doesn't really give me confidence that the collections package was ready for 1.0.
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
  4. burningmime

    burningmime

    Joined:
    Jan 25, 2014
    Posts:
    845