I’m trying to serialize an NGUI UIFont using JsonFX:
UIFont uiFont = (Resources.Load("arial") as GameObject).GetComponent<UIFont>(); string serialized = JsonFx.Json.JsonWriter.Serialize(uiFont);
However, the second line throws two exceptions:
> Material doesn't have a color property > '_Color' > System.Reflection.MonoProperty:GetValue(Object, > Object) > JsonFx.Json.JsonWriter:WriteObject(Object, > Type)
TargetParameterCountException: parameters do not match signature
I know that uiFont is not null (I checked), and this is pretty straightforward use of JxonFx. I’m not sure what would cause this error. Obviously it’s something that has to do with reflection, but uiFont.material.color is just a UnityEngine Color. I’m not sure why it’s looking for “_Color”.
What might cause this issue?