Class ProjectPreferences
Utility to save preferences that should be saved per project (i.e to source control) across MRTK. Supports primitive preferences bool, int, and float
Inheritance
ProjectPreferences
Implements
ScriptableObject
Assembly: cs.temp.dll.dll
public class ProjectPreferences : ScriptableObject, ScriptableObject
Properties
Declaration
protected static string FilePath { get; }
Property Value
Declaration
protected static string FilePath { get; }
Property Value
Methods
Get bool from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static bool Get(string key, bool defaultValue)
Parameters
Returns
Get bool from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static bool Get(string key, bool defaultValue)
Parameters
Returns
Get int from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static int Get(string key, int defaultValue)
Parameters
Returns
Get int from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static int Get(string key, int defaultValue)
Parameters
Returns
Get float from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static float Get(string key, float defaultValue)
Parameters
Returns
Get float from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static float Get(string key, float defaultValue)
Parameters
Returns
Get string from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static string Get(string key, string defaultValue)
Parameters
Returns
Get string from Project Preferences. If no entry found, then create new entry with provided defaultValue
Declaration
public static string Get(string key, string defaultValue)
Parameters
Returns
Remove key item from preferences if applicable
Declaration
public static void RemoveBool(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Remove key item from preferences if applicable
Declaration
public static void RemoveBool(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Remove key item from preferences if applicable
Declaration
public static void RemoveFloat(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Remove key item from preferences if applicable
Declaration
public static void RemoveFloat(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Remove key item from preferences if applicable
Declaration
public static void RemoveInt(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Remove key item from preferences if applicable
Declaration
public static void RemoveInt(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Remove key item from preferences if applicable
Declaration
public static void RemoveString(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Remove key item from preferences if applicable
Declaration
public static void RemoveString(string key)
Parameters
Type |
Name |
Description |
String |
key |
|
Save bool to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, bool value, bool forceSave = true)
Parameters
Save bool to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, bool value, bool forceSave = true)
Parameters
Save int to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, int value, bool forceSave = true)
Parameters
Save int to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, int value, bool forceSave = true)
Parameters
Save float to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, float value, bool forceSave = true)
Parameters
Save float to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, float value, bool forceSave = true)
Parameters
Save string to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, string value, bool forceSave = true)
Parameters
Save string to preferences and save to ScriptableObject with key given.
Declaration
public static void Set(string key, string value, bool forceSave = true)
Parameters
Implements
ScriptableObject