对类型 'Matrix4x4' 的引用声称它在 'System.Numerics' 中定义,但找不到
Reference to type 'Matrix4x4' claims it is defined in 'System.Numerics', but it could not be found
我正在为 Hololens 2 构建一个 Unity 项目,它使用来自 .NET
的库 System.Numerics
我按原样从 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
System.Numerics
似乎也不见了 Vector3
和 Vector2
类.
该项目已有几年历史,所以我使用的 Unity 版本可能需要更改配置中的某些内容以使其与 'System.Numerics' 版本兼容,其中 Matrix4x4
是当下。有谁知道如何解决这个问题?
我正在使用 Unity 2019.2.4f1
和 Windows Build Support IL2CPP
。
好的,看来是项目默认使用的.Net版本不对导致的。我不得不把它改成4.x,步骤是:
构建设置 -> 播放器设置 -> 其他设置 -> Api 兼容级别 和 select .Net 4.x
我正在为 Hololens 2 构建一个 Unity 项目,它使用来自 .NET
System.Numerics
我按原样从 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
System.Numerics
似乎也不见了 Vector3
和 Vector2
类.
该项目已有几年历史,所以我使用的 Unity 版本可能需要更改配置中的某些内容以使其与 'System.Numerics' 版本兼容,其中 Matrix4x4
是当下。有谁知道如何解决这个问题?
我正在使用 Unity 2019.2.4f1
和 Windows Build Support IL2CPP
。
好的,看来是项目默认使用的.Net版本不对导致的。我不得不把它改成4.x,步骤是:
构建设置 -> 播放器设置 -> 其他设置 -> Api 兼容级别 和 select .Net 4.x