Build/compiler error from Collections

We upgraded our game project from 2019.4 to 2020.3.38 and it’s working fine – except that builds fail, due to a bunch of errors about Collections, starting with this one:

Library\PackageCache\com.unity.collections@1.4.0\Unity.Collections\AllocatorManager.cs(237,37): error CS0246: The type or namespace name ‘AtomicSafetyHandle’ could not be found (are you missing a using directive or an assembly reference?)

The rest are similar, pointing to different scripts in Unity.Collections with the same issue. This is very strange since I did some test upgrades of the project and they had no trouble doing builds. Below are the packages installed. I found this thread from 2020 and tried what people suggested, but no help: Missing references in the Collections package

Any help would be much appreciated!

thanks
Dave

8400522--1109127--upload_2022-8-29_17-20-37.png

Have you by any chance defined ENABLE_UNITY_COLLECTIONS_CHECKS in your player settings? That would definitely have this symptom, and will not work.

Thanks! We have, so I removed it – but it gets added automatically when I apply changes to the Player Settings. We searched the project and did not find that string anywhere in the code, so we don’t know what is adding it…any other suggestions on how to track this down?

1 Like

Looks like some plugin was caching the Player Settings and adding that define back in. I edited the PlayerSettings file to remove it, and that solved the problem. Thanks for the guidance!

1 Like