public static void Load(string profileName) { ClearWithoutEvent(); items = Decrypt(PlayerPrefs.GetString(profileName + "_IntData", "")).Split('\n'); for (int i = 0; i < items.Length; i++) { if (items[i].Length == 0) { continue; } string key = ""; int intValue = 0; if (DeserializeInt(items[i], out key, out intValue)) { IntValues.Set(key, intValue); } } items = Decrypt(PlayerPrefs.GetString(profileName + "_FloatData", "")).Split('\n'); for (int i = 0; i < items.Length; i++) { if (items[i].Length == 0) { continue; } string key = ""; float floatValue = 0; if (DeserializeFloat(items[i], out key, out floatValue)) { FloatValues.Set(key, floatValue); } } items = Decrypt(PlayerPrefs.GetString(profileName + "_StringData", "")).Split('\n'); for (int i = 0; i < items.Length; i++) { if (items[i].Length == 0) { continue; } string key = ""; string stringValue = ""; if (DeserializeString(items[i], out key, out stringValue)) { StringValues.Set(key, stringValue); } } items = Decrypt(PlayerPrefs.GetString(profileName + "_Vector3Data", "")).Split('\n'); for (int i = 0; i < items.Length; i++) { if (items[i].Length == 0) { continue; } string key = ""; Vector3 Vector3Value = Vector3.zero; if (DeserializeVector3(items[i], out key, out Vector3Value)) { Vector3Values.Set(key, Vector3Value); } } items = Decrypt(PlayerPrefs.GetString(profileName + "_ColorData", "")).Split('\n'); for (int i = 0; i < items.Length; i++) { if (items[i].Length == 0) { continue; } string key = ""; Color ColorValue = Color.white; if (DeserializeColor(items[i], out key, out ColorValue)) { ColorValues.Set(key, ColorValue); } } CurrentProfile = profileName; if (OnLoad != null) { OnLoad(); } }