I'm trying to use Span in Unity.
I understand that System.Memory
is not supported yet, but I'd like to implement it anyway.
I directly downloaded the library from NuGet. I got the System.Memory.dll
from netstandard2.0 folder in the nuget package and dragged it in the project Assets/Scripts folder.
But I get this error, and I cannot use it in my IDE (Rider).
Assembly 'Assets/System.Memory.dll' will not be loaded due to errors: Unable to resolve reference 'System.Runtime.CompilerServices.Unsafe'. Is the assembly missing or incompatible with the current platform?
My question is: how can I use Span in Unity?
Unity Version: Unity 2019.1.7f.
OS: Windows
System.Runtime.CompilerServices.Unsafe
. Look at the "Dependencies" tab on NuGet to see what dependencies it needs. You'll need to check all of your dependencies' dependencies too. Probably easier to follow stackoverflow.com/a/53458099/1086121 – canton7