Class Prefs<T>
Wrapper for Unity's PlayerPrefs with type safety and serialization support.
This class allows you to store and retrieve various types of data in PlayerPrefs,
while ensuring type safety and automatic serialization/deserialization.
Assembly: Glitch9.dll
Syntax
Type Parameters
| Name |
Description |
| T |
The type of the value to be stored in PlayerPrefs.
Supported types include: int, float, string, bool, UnixTime, Vector2, Vector3, Quaternion, and more.
|
Constructors
|
Edit this page
View Source
Prefs(string, T)
Declaration
public Prefs(string prefsKey, T defaultValue)
Parameters
| Type |
Name |
Description |
| string |
prefsKey |
|
| T |
defaultValue |
|
Properties
|
Edit this page
View Source
Value
Declaration
public T Value { get; set; }
Property Value
Methods
|
Edit this page
View Source
Clear()
Declaration
Operators
|
Edit this page
View Source
implicit operator T(Prefs<T>)
Declaration
public static implicit operator T(Prefs<T> prefs)
Parameters
| Type |
Name |
Description |
| Prefs<T> |
prefs |
|
Returns
Extension Methods