public static string GetPlayerPrefString(Save_Keys type, string extra = "") { if (!PlayerPrefs.HasKey(type.ToString() + extra)) { return(""); //throw new UnityException("Key '" + type + "' does not exist!"); } return(PlayerPrefs.GetString(type.ToString() + extra)); }
public static string GetPlayerPrefString(Save_Keys type, string extra = "") { if (!PlayerPrefs.HasKey(type.ToString() + extra)) { return null; //throw new UnityException("Key '" + type + "' does not exist!"); } return PlayerPrefs.GetString(type.ToString() + extra); }
public static float? GetPlayerPrefFloat(Save_Keys type) { if (!PlayerPrefs.HasKey(type.ToString())) { return null; //throw new UnityException("Key '" + type + "' does not exist!"); } return PlayerPrefs.GetFloat(type.ToString()); }
public static float GetPlayerPrefFloat(Save_Keys type) { if (!PlayerPrefs.HasKey(type.ToString())) { return(0.0f); throw new UnityException("Key '" + type + "' does not exist!"); } return(PlayerPrefs.GetFloat(type.ToString())); }
public static int GetPlayerPrefInt(Save_Keys type) { if (!PlayerPrefs.HasKey(type.ToString())) { switch (type) { case Save_Keys.Key_Coins: { return 10; } break; default: { return 0; } } //throw new UnityException("Key '" + type + "' does not exist!"); } return PlayerPrefs.GetInt(type.ToString()); }
public static int GetPlayerPrefInt(Save_Keys type) { if (!PlayerPrefs.HasKey(type.ToString())) { switch (type) { case Save_Keys.Key_Coins: { return(10); } break; default: { return(0); } } //throw new UnityException("Key '" + type + "' does not exist!"); } return(PlayerPrefs.GetInt(type.ToString())); }