Collections 1.0.0-pre.3 incompatible with Jobs 0.8.0-preview.23

Is anybody else facing the same Jobs compilation error within IJobParallelForDefer.cs when using the Collections 1.0.0-pre.3 preview package? Below is the exact error.

Library\PackageCache\com.unity.jobs@0.8.0-preview.23\Unity.Jobs\IJobParallelForDefer.cs(77,85): error CS8377: The type 'U' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'NativeList<T>'

Downgrade your collections package. Compatible packages for ECS/jobs have not been released yet.

Yah, I rolled back to 0.17.0-preview.18 and it fixed everything. I just didn’t see any other posts mentioning the conflict when searching for the error and was curious if anybody else had noticed.

Are you using Collections 0.17 with Entities or just jobs?

If I recall we ran into issues when trying to use Collections 0.17 and Entities 0.17.

@desertGhost I am just using Jobs.

Unrelated, but I have come so close to using Entities on so many occasions. Every time I am held back by certain features not existing for Entities yet, along with Unity’s recent “It won’t be compatible for the rest of the 2021 year; Okay bye”. I really hope they pull through and get it together, I desperately want to be using Entities but can’t justify it with the unknowns currently.

I ran into this error when updating to 2021.3 (bringing me here), and there weren’t any older versions of Collections so I just updated Jobs to 0.50.0-preview.9 and it fixed the error.

Entities 0.17 used to work with 2021.2 and 2021.3. Until now as there is no way to downgrade Collections back to 0.15 (and the new version doesn’t work with entities .17). That is a big breaking change for a LTS version. Good thing we did not update.

How did you manage to rollback? It seems like Unity 2021.3.1 enforces the newest version of Collections.

@alexandre-fiset This is an old forum, however I know that Unity’s been very forthright and up front that Entities is not supported in Unity 2021, but they recently released Entities 0.50.0, and they announced that while it still doesn’t support Unity 2021, the very next preview release (they say 0.51.0) will support Unity 2021.

Both when I created this forum post and still currently, I’m on 2020 LTS

Entities 0.17 + dependencies works fine in 2021.3.0f1. FYI.

Yes but not in 2021.3.1.

Unity never officially supported Entities 0.17 in the 2021 stream, but it always worked. So it came as a surprise that out of a sudden, an update broke it. I assume they are preparring to launch 0.51 fairly soon.

For anyone who might have the same issue: Adding collections to the manifest without going through the package manager did not work, but this did:

  • Add com.unity.collections from the package manager “add from git url”

  • Let it compile

  • Open the package manifest.json

  • Change collections to “com.unity.collections”: “0.15.0-preview.21”

  • Let it compile

That worked and now everything works fine in 2021.3.2. I had to fix some deprecated jobs types but that’s all.

Hi,I followed these ways above in 2021.3.5f1 but it eventually rolled back to Collections 1.2.3 no matter what, strange.

-----------edit------------

Figures, because too many advanced features such as Transport 1.0.0 depend on Collections 1.2.3, downgrade all dependencies first.

But it still seems rarefied, most advanced features depends on Burst, Jobs, Collections, and Entities 0.17.0 gets malfunctioning when upgraded.

Tricky one.