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 objects) return objects.Select(x => ConvertToNative(x)).ToList(); } + public object ConvertToNativeDisplayable(Base @object) + { + throw new NotImplementedException( + $"{nameof(ConvertToNativeDisplayable)} is not implemented by this converter, use {nameof(ConvertToNative)} instead" + ); + } + + public bool CanConvertToNativeDisplayable(Base @object) + { + throw new NotImplementedException(); + } + public bool CanConvertToSpeckle(object @object) { switch (@object) diff --git a/Packages/systems.speckle.speckle-unity/Runtime/Core/System.DoubleNumerics.dll.meta b/Packages/systems.speckle.speckle-unity/Runtime/Core/System.DoubleNumerics.dll.meta new file mode 100644 index 0000000..a074f0b --- /dev/null +++ b/Packages/systems.speckle.speckle-unity/Runtime/Core/System.DoubleNumerics.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: a85708f21043b0c458a3a77c0e09e4b8 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: