Unity Connector: Incompatibility with Unity Collections Package

Hi, I want to use the Unity Speckle Connector package in a project that also needs the unity.collections package.

When installing both packages (regardless in which order) I’m getting 4 compilation errors about a not found function “umul128” in the unity collections package, when the second package is installed:
Library\PackageCache\com.unity.collections@1.5.1\Unity.Collections\xxHash3.cs[places where the function is used]: error CS0234: The type or namespace name ‘umul128’ does not exist in the namespace ‘Common’ (are you missing an assembly reference?).
I could not find a namespace “Common” in the Unity Speckle Connector files nor an assembly definition, so I have no clue, why this happens (while researching, I found other projects facing this issue, that used assembly definitions, names Common[…]).

Changing the Unity Collection calls of Common.umul128(…) to reference the full namespace Unity.Burst.Intrinsics.Common.umul128(…) resolves the error, but it is undone when unity reloads the packages (like when restarting the editor).

I tested the behavior with blank projects on different unity versions (2021.3.16f1 and 2022.3.1f1).

I can reproduce.
Just from a little investigation, it appears Unity.Collections has been breaking in the same way for many other Unity plugins, not just ours.

Results inconclusive, I’ll keep investigating, but this may not be something we can fix our end.

1 Like