From c812fd461341fc2b3ea38c2322a331e6c45898ae Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sat, 30 Mar 2024 15:39:23 -0400 Subject: [PATCH] Fix copy pasting Virt entries --- Editor/Editor/Serialization/WDOMNodeConverter.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Editor/Editor/Serialization/WDOMNodeConverter.cs b/Editor/Editor/Serialization/WDOMNodeConverter.cs index 7f09ff29..0c9c2e66 100644 --- a/Editor/Editor/Serialization/WDOMNodeConverter.cs +++ b/Editor/Editor/Serialization/WDOMNodeConverter.cs @@ -220,6 +220,15 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist prop.SetValue(newNode, evnt); } } + else if (prop.PropertyType == typeof(WLinearColor)) + { + WLinearColor value = new WLinearColor(); + value.R = ((float?)jsonValue["R"]).GetValueOrDefault(); + value.G = ((float?)jsonValue["G"]).GetValueOrDefault(); + value.B = ((float?)jsonValue["B"]).GetValueOrDefault(); + value.A = ((float?)jsonValue["A"]).GetValueOrDefault(); + prop.SetValue(newNode, value); + } else { var value = Convert.ChangeType(jsonValue, prop.PropertyType);