【发布时间】:2021-07-21 02:19:37
【问题描述】:
我正在为 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 版本可能需要更改配置中的某些内容,以使其与存在 Matrix4x4 的“System.Numerics”版本兼容。有谁知道如何解决这个问题?
我正在使用 Unity 2019.2.4f1 和 Windows Build Support IL2CPP。
【问题讨论】:
-
你使用
System.Numerics而不是Unity内置类型UnityEngine.Matrix4x4、UnityEngine.Vector3等有什么原因吗? -
实际上我以那个项目为例说明如何使用场景理解,我只是想让它按原样工作。如果我最终重写项目以适应我的需求,我会听取你的建议