Simply put this script anywhere inside your project's asset folder and call the static methods from wherever you require.
You'll now be able to Get
and Set
bools, Vector2s, Vector3s and Quaternions!
These methods can be used in exactly the same way as the standard Unity PlayerPrefs system. Simply call Comp3PlayerPrefs.SetBool("MyBool", true);
for example and then to retrieve call Comp3PlayerPrefs.GetBool("MyBool");
. Also, the standard PlayerPrefs.HasKey(string key);
and PlayerPrefs.DeleteAll();
methods will include these new PlayerPrefs too!
New Methods:
SetBool(string key, bool val) GetBool(string key) SetVector3(string key, Vector3 v3) GetVector3(string key) SetVector2(string key, Vector2 v2) GetVector2(string key) SetQuaternion(string key, Quaternion q) GetQuaternion(string key)