protected override void SaveValue(PersistantAttribute attribute, object saveValue)
            {
                string stringValue = saveValue as string;

                Assert.IsNotNull(stringValue);
                savedValues.Add(attribute.Key, stringValue);
            }
        protected override object LoadValue(PersistantAttribute attribute, Type objectType)
        {
            string decrypt = Decrypt(PlayerPrefs.GetString(Encrypt(attribute.Key)));

            return(string.IsNullOrEmpty(decrypt)
                ? Convert.ChangeType(attribute.DefaultValue ?? decrypt, objectType)
                : Convert.ChangeType(decrypt, objectType));
        }
 protected override void SaveValue(PersistantAttribute attribute, object saveValue)
 {
     PlayerPrefs.SetString(Encrypt(attribute.Key), Encrypt(saveValue.ToString()));
 }
 protected override object LoadValue(PersistantAttribute attribute, Type objectType)
 {
     return(savedValues.ContainsKey(attribute.Key)
         ? savedValues[attribute.Key]
         : attribute.DefaultValue);
 }