keijiro / jp.keijiro.libsoundio

libsoundio C# thin wrapper class library for Unity
MIT License
119 stars 11 forks source link

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' #4

Closed robclouth closed 3 years ago

robclouth commented 3 years ago

Opening this repo with 2021.2.0b13 on Windows 10 causes this compiler error. Any ideas?

Packages\jp.keijiro.libsoundio\Runtime\Device.cs(66,23): error CS0433: The type 'Span' 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'

keijiro commented 3 years ago

I think you're using HDRP -- That's a known issue of HDRP with Unity 2021.2.

https://forum.unity.com/threads/2021-2-0b6-and-system-memory-readonlyspan-under-net-4-8.1152104/

Please watch the forum thread for further progress. (Long story short, the fix is coming soon.)

keijiro commented 3 years ago

I'm closing this issue now. Please feel free to reopen it if it reproduces without HDRP.

robclouth commented 3 years ago

I am using HDRP! Thanks for tip, would have spent hours tracking that down.

robclouth commented 3 years ago

For anyone that's in the same situation, there's a workaround in the forum link above:

As a workaround for the searcher bug, find the package manager cache in your user folder (AppData in windows) and delete the System.Memory.dll and meta files from the Searcher "Lucene" folder. After deleting the cache, delete the copy from your project packages folder (just the dll) and it should work again. (Well, u wont be able to build your game, but editor and play mode work fine)

After doing that this package works great.