Class PlayerPrefsExtra
A collection of utility methods that simplify calls into UnityEngine.PlayerPrefs for quick custom save data.
public static class PlayerPrefsExtra
- Inheritance
-
PlayerPrefsExtra
- Inherited Members
Methods
GetBool(string, bool)
Get a bool value using UnityEngine.PlayerPrefs
public static bool GetBool(string key, bool defaultValue)
Parameters
Returns
GetColor(string)
Get a UnityEngine.Color value using UnityEngine.PlayerPrefs
public static Color GetColor(string key)
Parameters
key
string
Returns
- Color
GetColor(string, Color)
Get a UnityEngine.Color value using UnityEngine.PlayerPrefs
public static Color GetColor(string key, Color defaultValue)
Parameters
key
stringdefaultValue
Color
Returns
- Color
GetKeyCode(string, KeyCode)
Get a UnityEngine.KeyCode value using UnityEngine.PlayerPrefs
public static KeyCode GetKeyCode(string key, KeyCode defaultValue)
Parameters
key
stringdefaultValue
KeyCode
Returns
- KeyCode
GetQuaternion(string)
Get a UnityEngine.Quaternion value using UnityEngine.PlayerPrefs
public static Quaternion GetQuaternion(string key)
Parameters
key
string
Returns
- Quaternion
GetQuaternion(string, Quaternion)
Get a UnityEngine.Quaternion value using UnityEngine.PlayerPrefs
public static Quaternion GetQuaternion(string key, Quaternion defaultValue)
Parameters
key
stringdefaultValue
Quaternion
Returns
- Quaternion
GetVector2(string)
Get a UnityEngine.Vector2 value using UnityEngine.PlayerPrefs
public static Vector2 GetVector2(string key)
Parameters
key
string
Returns
- Vector2
GetVector2(string, Vector2)
Get a UnityEngine.Vector2 value using UnityEngine.PlayerPrefs
public static Vector2 GetVector2(string key, Vector2 defaultValue)
Parameters
key
stringdefaultValue
Vector2
Returns
- Vector2
GetVector2int(string)
Get a Vector2int value using UnityEngine.PlayerPrefs
public static Vector2int GetVector2int(string key)
Parameters
key
string
Returns
- Vector2int
GetVector2int(string, Vector2int)
Get a Vector2int value using UnityEngine.PlayerPrefs
public static Vector2int GetVector2int(string key, Vector2int defaultValue)
Parameters
key
stringdefaultValue
Vector2int
Returns
- Vector2int
GetVector3(string)
Get a UnityEngine.Vector3 value using UnityEngine.PlayerPrefs
public static Vector3 GetVector3(string key)
Parameters
key
string
Returns
- Vector3
GetVector3(string, Vector3)
Get a UnityEngine.Vector3 value using UnityEngine.PlayerPrefs
public static Vector3 GetVector3(string key, Vector3 defaultValue)
Parameters
key
stringdefaultValue
Vector3
Returns
- Vector3
GetVector4(string)
Get a UnityEngine.Vector4 value using UnityEngine.PlayerPrefs
public static Vector4 GetVector4(string key)
Parameters
key
string
Returns
- Vector4
GetVector4(string, Vector4)
Get a UnityEngine.Vector4 value using UnityEngine.PlayerPrefs
public static Vector4 GetVector4(string key, Vector4 defaultValue)
Parameters
key
stringdefaultValue
Vector4
Returns
- Vector4
SetBool(string, bool)
Set a bool value using UnityEngine.PlayerPrefs
public static void SetBool(string key, bool value)
Parameters
SetColor(string, Color)
Set a UnityEngine.Color value using UnityEngine.PlayerPrefs
public static void SetColor(string key, Color value)
Parameters
key
stringvalue
Color
SetKeyCode(string, KeyCode)
Set a UnityEngine.KeyCode value using UnityEngine.PlayerPrefs
public static void SetKeyCode(string key, KeyCode value)
Parameters
key
stringvalue
KeyCode
SetQuaternion(string, Quaternion)
Set a UnityEngine.Quaternion value using UnityEngine.PlayerPrefs
public static void SetQuaternion(string key, Quaternion value)
Parameters
key
stringvalue
Quaternion
SetVector2(string, Vector2)
Set a UnityEngine.Vector2 value using UnityEngine.PlayerPrefs
public static void SetVector2(string key, Vector2 value)
Parameters
key
stringvalue
Vector2
SetVector2int(string, Vector2int)
Set a Vector2int value using UnityEngine.PlayerPrefs
public static void SetVector2int(string key, Vector2int value)
Parameters
key
stringvalue
Vector2int
SetVector3(string, Vector3)
Set a UnityEngine.Vector3 value using UnityEngine.PlayerPrefs
public static void SetVector3(string key, Vector3 value)
Parameters
key
stringvalue
Vector3
SetVector4(string, Vector4)
Set a UnityEngine.Vector4 value using UnityEngine.PlayerPrefs
public static void SetVector4(string key, Vector4 value)
Parameters
key
stringvalue
Vector4