public static void WriteIntField(this LitJson.JsonWriter writer, string propertyName, Vector2 value) { propertyName = propertyName.Replace(".", "#"); writer.WritePropertyName(propertyName); writer.WriteObjectStart(); writer.WriteField("x", (int)value.x); writer.WriteField("y", (int)value.y); writer.WriteObjectEnd(); }
public static void WriteField(this LitJson.JsonWriter writer, string propertyName, Quaternion value) { propertyName = propertyName.Replace(".", "#"); writer.WritePropertyName(propertyName); writer.WriteObjectStart(); writer.WriteField("x", value.eulerAngles.x); writer.WriteField("y", value.eulerAngles.y); writer.WriteField("z", value.eulerAngles.z); writer.WriteObjectEnd(); }