private void Awake() { m_Settings = new DefaultSetting(); m_Serializer = new DefaultSettingSerializer(); m_Serializer.RegisterSerializeCallback(0, SerializeDefaultSettingCallback); m_Serializer.RegisterDeserializeCallback(0, DeserializeDefaultSettingCallback); }
private void Awake() { m_FilePath = Utility.Path.GetRegularPath(Path.Combine(Application.persistentDataPath, SettingFileName)); m_Settings = new DefaultSetting(); m_Serializer = new DefaultSettingSerializer(); m_Serializer.RegisterSerializeCallback(0, SerializeDefaultSettingCallback); m_Serializer.RegisterDeserializeCallback(0, DeserializeDefaultSettingCallback); }
private bool SerializeDefaultSettingCallback(Stream stream, DefaultSetting defaultSetting) { m_Settings.Serialize(stream); return(true); }
private bool SerializeDefaultSettingCallback(BinaryWriter binaryWriter, DefaultSetting defaultSetting) { m_Settings.Serialize(binaryWriter); return(true); }