From 7c8f70c0c04502dfd36ada26e433e47f6d9d497d Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:40:08 +0100 Subject: [PATCH] Attach Speckle Properties to instances --- .../Runtime/Converter/Unity/ConverterUnity.Geometry.cs | 9 +++++++++ Packages/systems.speckle.speckle-unity/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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 44dbbff..7c6eb31 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 @@ -178,8 +178,14 @@ public virtual Point PointToSpeckle(Vector3 p) excludeProps.Add(alias); } + excludeProps.Add("@Materials"); + excludeProps.Add("@Views"); excludeProps.Add("renderMaterial"); + excludeProps.Add("typedDefinition"); + excludeProps.Add("definition"); + excludeProps.Add("geometry"); excludeProps.Add("elements"); + excludeProps.Add("transform"); excludeProps.Add("name"); //excludeProps.Add("tag"); excludeProps.Add("physicsLayer"); @@ -294,6 +300,9 @@ public GameObject InstanceToNative(Instance instance) : defName; native.name = instanceName; + + AttachSpeckleProperties(native, instance.GetType(), () => GetProperties(instance)); + return native; } diff --git a/Packages/systems.speckle.speckle-unity/package.json b/Packages/systems.speckle.speckle-unity/package.json index f15e2b9..cdd027d 100644 --- a/Packages/systems.speckle.speckle-unity/package.json +++ b/Packages/systems.speckle.speckle-unity/package.json @@ -1,6 +1,6 @@ { "name": "systems.speckle.speckle-unity", - "version": "2.15.1", + "version": "2.15.2", "displayName": "Speckle Unity Connector", "description": "AEC Interoperability for Unity through Speckle", "unity": "2021.1",