SaveSystemSerializer
Overview
The SaveSystemSerializer class is a part of the save system in your game. It is responsible for serializing and deserializing objects. It uses the Json.NET library to convert objects to JSON format and vice versa.
Properties
_settings
This is a private read-only property of type JsonSerializerSettings. It is used to configure the serialization and deserialization process. It includes a list of JsonConverter objects for handling specific types (Vector2, Vector3, Quaternion), and settings for handling type names and formatting.
Methods
SerializeObject(object data)
This method takes an object as a parameter and returns a string. It uses the JsonConvert.SerializeObject method from the Json.NET library to convert the object to a JSON string. The _settings property is used to configure the serialization process.
DeserializeObject(string jsonData, Type type)
This method takes a JSON string and a Type as parameters and returns an object. It uses the JsonConvert.DeserializeObject method from the Json.NET library to convert the JSON string back to an object of the specified type. The _settings property is used to configure the deserialization process.