Class PlayerPrefs
Namespace: AppMana.Compatibility
This class provides compatibility with the UnityEngine.PlayerPrefs class.
public static class PlayerPrefs
Inheritance
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
This differs from the default PlayerPrefs in two ways: This class saves after every preference
change. Each type (string, int and float) has a distinct key mapping.
Properties
defaultRemotePlayerPrefs
public static RemotePlayerPrefs defaultRemotePlayerPrefs { get; }
Property Value
Methods
DeleteAll()
public static void DeleteAll()
DeleteKey(string)
public static void DeleteKey(string key)
Parameters
key string
GetFloat(string, float)
public static float GetFloat(string key, float defaultValue = 0)
Parameters
key string
defaultValue float
Returns
GetInt(string, int)
public static int GetInt(string key, int defaultValue = 0)
Parameters
key string
defaultValue int
Returns
GetString(string, string)
public static string GetString(string key, string defaultValue = "")
Parameters
key string
defaultValue string
Returns
HasKey(string)
public static bool HasKey(string key)
Parameters
key string
Returns
Save()
public static void Save()
SetFloat(string, float)
public static void SetFloat(string key, float value)
Parameters
key string
value float
SetInt(string, int)
public static void SetInt(string key, int value)
Parameters
key string
value int
SetString(string, string)
public static void SetString(string key, string value)
Parameters
key string
value string
