コード例 #1
0
 private void Awake()
 {
     m_Settings   = new DefaultSetting();
     m_Serializer = new DefaultSettingSerializer();
     m_Serializer.RegisterSerializeCallback(0, SerializeDefaultSettingCallback);
     m_Serializer.RegisterDeserializeCallback(0, DeserializeDefaultSettingCallback);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 private bool SerializeDefaultSettingCallback(Stream stream, DefaultSetting defaultSetting)
 {
     m_Settings.Serialize(stream);
     return(true);
 }
コード例 #4
0
 private bool SerializeDefaultSettingCallback(BinaryWriter binaryWriter, DefaultSetting defaultSetting)
 {
     m_Settings.Serialize(binaryWriter);
     return(true);
 }