Skip to content

Commit

Permalink
Fix copy pasting Virt entries
Browse files Browse the repository at this point in the history
  • Loading branch information
LagoLunatic committed Mar 30, 2024
1 parent 5be6599 commit c812fd4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Editor/Editor/Serialization/WDOMNodeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c812fd4

Please sign in to comment.