Skip to main content

Vector3TypeConverter

A class in Root.Township, Alta.Console.

JSON converter that writes a Vector3 as a three-number array and reads it back.

Constructors​

MemberWhat it is
Vector3TypeConverter()Creates a Vector3TypeConverter with default values.

Methods​

MemberWhat it is
override Vector3 ReadJson(JsonReader reader, Type objectType, Vector3 existingValue, bool hasExistingValue, JsonSerializer serializer)Reads [x, y, z]; returns zero if the token is not an array.
override void WriteJson(JsonWriter writer, Vector3 value, JsonSerializer serializer)Writes [x, y, z].