public static string[] GetStringArray(string key) { if (PsdLayerPrefs.HasKey(key)) { return(PsdLayerPrefs.GetString(key).Split("\n"[0])); } return(new string[0]); }
public static string[] GetStringArray(string key, char separator) { if (PsdLayerPrefs.HasKey(key)) { return(PsdLayerPrefs.GetString(key).Split(separator)); } return(new string[0]); }
public static string[] GetStringArray(string key, char separator, string defaultValue, int defaultSize) { if (PsdLayerPrefs.HasKey(key)) { return(PsdLayerPrefs.GetString(key).Split(separator)); } var strings = new string[defaultSize]; for (int i = 0; i < defaultSize; i++) { strings[i] = defaultValue; } return(strings); }
public static float GetFloat(string key, float defaultValue) { var ret = PsdLayerPrefs.GetString(key); return(!string.IsNullOrEmpty(ret) ? float.Parse(ret) : defaultValue); }
public static int GetInt(string key, int defaultValue) { var ret = PsdLayerPrefs.GetString(key); return(!string.IsNullOrEmpty(ret) ? int.Parse(ret) : defaultValue); }
public static string GetString(string key) { return(PsdLayerPrefs.GetString(key, "")); }