Ign*_*rre 0 unity-game-engine hololens mrtk
我正在为 Hololens 2 构建一个 Unity 项目,该项目使用System.Numerics来自.NET
我按原样从 git 导入了这个项目,但遇到了一些类似于以下内容的错误:
System.Numerics.Matrix4x4 converted4x4LocationMatrix = ConvertRightHandedMatrix4x4ToLeftHanded(suObject.GetLocationAsMatrix());
error CS7069: Reference to type 'Matrix4x4' claims it is defined in 'System.Numerics', but it could not be found
Run Code Online (Sandbox Code Playgroud)
System.Numerics似乎也缺少Vector3课程Vector2。
该项目已有几年历史,因此我使用的 Unity 版本可能需要更改配置中的某些内容,以使其与存在的“System.Numerics”版本兼容Matrix4x4。有谁知道如何解决这一问题?
我正在使用Unity 2019.2.4f1与Windows Build Support IL2CPP.
好吧,看来这个错误是由于项目中默认使用的.Net 版本错误造成的。我不得不将其更改为4.x,步骤是:
构建设置->播放器设置->其他设置-> Api 兼容性级别并选择.Net 4.x