From 2755a9abd7c9ecf7599add5f3ef52fda55509939 Mon Sep 17 00:00:00 2001
From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
Date: Tue, 31 Oct 2023 12:15:13 +0000
Subject: [PATCH] Fix compiler errors for 2.16 core/objects bump
---
.../Unity/ConverterUnity.Geometry.cs | 26 +++++++--------
.../Runtime/Converter/Unity/ConverterUnity.cs | 12 +++++++
.../Core/System.DoubleNumerics.dll.meta | 33 +++++++++++++++++++
3 files changed, 58 insertions(+), 13 deletions(-)
create mode 100644 Packages/systems.speckle.speckle-unity/Runtime/Core/System.DoubleNumerics.dll.meta
diff --git a/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.Geometry.cs b/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.Geometry.cs
index 56e8289..0105c13 100644
--- a/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.Geometry.cs
+++ b/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.Geometry.cs
@@ -357,25 +357,25 @@ public Matrix4x4 TransformToNativeMatrix(STransform speckleTransform)
return new Matrix4x4
{
// Left (X -> X)
- [0, 0] = smatrix.M11,
- [2, 0] = smatrix.M21,
- [1, 0] = smatrix.M31,
- [3, 0] = smatrix.M41,
+ [0, 0] = (float)smatrix.M11,
+ [2, 0] = (float)smatrix.M21,
+ [1, 0] = (float)smatrix.M31,
+ [3, 0] = (float)smatrix.M41,
//Up (Z -> Y)
- [0, 2] = smatrix.M12,
- [2, 2] = smatrix.M22,
- [1, 2] = smatrix.M32,
- [3, 2] = smatrix.M42,
+ [0, 2] = (float)smatrix.M12,
+ [2, 2] = (float)smatrix.M22,
+ [1, 2] = (float)smatrix.M32,
+ [3, 2] = (float)smatrix.M42,
//Forwards (Y -> Z)
- [0, 1] = smatrix.M13,
- [2, 1] = smatrix.M23,
- [1, 1] = smatrix.M33,
- [3, 1] = smatrix.M43,
+ [0, 1] = (float)smatrix.M13,
+ [2, 1] = (float)smatrix.M23,
+ [1, 1] = (float)smatrix.M33,
+ [3, 1] = (float)smatrix.M43,
//Translation
[0, 3] = (float)(smatrix.M14 * sf),
[2, 3] = (float)(smatrix.M24 * sf),
[1, 3] = (float)(smatrix.M34 * sf),
- [3, 3] = smatrix.M44,
+ [3, 3] = (float)smatrix.M44,
};
}
diff --git a/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.cs b/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.cs
index f195435..71e0ca8 100644
--- a/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.cs
+++ b/Packages/systems.speckle.speckle-unity/Runtime/Converter/Unity/ConverterUnity.cs
@@ -202,6 +202,18 @@ public List ConvertToSpeckle(List