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);