specklesystems / speckle-unity

AEC Interoperability for Unity through Speckle
https://speckle.systems/tag/unity/
Apache License 2.0
55 stars 20 forks source link

Incompatibility with Unity Collections Package (namespace conflicts) #109

Closed vsonixbieber closed 5 months ago

vsonixbieber commented 7 months ago

Combining the speckle package with the unity collections package results in compilation errors due to namespace conflicts. Screenshot 2024-01-22 135759 I tested this behaviour in blank projects with unity versions 2021.3.16f1 and 2022.3.1f1 (build platform windows, mac & linux).

JR-Morgan commented 7 months ago

The other reports of this conflict appear to be with a package called Common.Logging (or a custom Commons.dll)

https://github.com/MoralisWeb3/unity-web3-game-kit/issues/76 https://github.com/Nethereum/Nethereum/issues/695 https://github.com/magiclabs/magic-unity/issues/7

This isn't a package we use, however, it looks like for us, its a conflict with System.DoubleNumerics specifically this internal class:

https://github.com/Weingartner/System.Numerics.DoubleVectors/blob/master/System.DoubleNumerics/Common/System/Numerics/Hashing/HashHelpers.cs


Its a shame Unity refuses to fix this on their end, since it would easiest to apply the fix to umul128. https://issuetracker.unity3d.com/issues/namespace-umul128-error-when-multiplayer-netcode-for-gameobjects-is-installed-along-with-common-dot-logging-dot-core-library


There's no simple fixes we can do our end, since we depend on System.DoubleNumerics, right now, we don't have a work around unless we decide to fork the project.

JR-Morgan commented 7 months ago

See forum discussion https://speckle.community/t/unity-connector-incompatibility-with-unity-collections-package/8840

Agoxandr commented 5 months ago

Based on this I made a fork. It's pretty easy to keep it in sync with upstream this way.

JR-Morgan commented 5 months ago

Marking as Not Planned. We don't have any plans to replace System.DoubleNumerics any time soon.

If there's more user demand we can re-consider this.