UCL-VR / ubiq

Other
98 stars 34 forks source link

Net compatibility issues with Unity version 2021.3.X #28

Closed TheBv closed 7 months ago

TheBv commented 1 year ago

When using Unity 2021.3.X we can run and build the project without any problems.

We do however get some errors in the editor/we also can't debug the application because of them. E.g. :

The type 'Span<T>' exists in both 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' and 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'

I wouldn't have mentioned this since ubiq still uses 2020.X but a recent commit addressed some issues in regards to other issues with 2021.X See ca6d8ea

I've had resolved these issues before by removing the plugin .dlls since things seem to work without them, but maybe I'm missing something. See ubiq-fork

So I assume it might have to do with the existing plugin libraries using a different net standard? I'm not sure though.

bnco-dev commented 1 year ago

Thanks for the report - we do try to support 2020.3 onwards, and have our students using 2021.3 this year, so it's definitely good to know.

The issue is that Unity has included the relevant bits from System.Memory since 2021.2, so the plugins cause a conflict. What's strange to me is that I can't reproduce this on 2021.3. I've tried importing 0.4.3 as a upm package and just re-importing the project with 2021.3 too, but no error.

Could you let me know your exact Unity version and closest ubiq version and I'll try to get to the bottom of it?

In any case, it should be safe to delete the System.Memory plugin if you're on 2021.2 or later, as you do in your fork.

TheBv commented 1 year ago

Exact Unity version was 2021.3.18f1 with the current most recent commit on this github b4fcc66

I think in hindsight as you've mentioned if I were to import the package instead I might not have this issue anymore. For our current workflow we've used ubiq as a submodule in our project so we could more easily update it. But just for clarification just opening this repo with Unity version 2021.3.18 caused this issue.

I personally haven't checked if this issue arises when importing the package. But if you haven't I think it's safe to say it won't.