ProjectPreferences Class

Definition

Utility to save preferences that should be saved per project (i.e to source control) across MRTK. Supports primitive preferences bool, int, and float

C++
public ref class ProjectPreferences : UnityEngine::ScriptableObject
Inheritance
UnityEngine.ScriptableObject
ProjectPreferences

Constructors

Properties

Methods

Get(String, Boolean)

Get bool from Project Preferences. If no entry found, then create new entry with provided defaultValue

Get(String, Int32)

Get int from Project Preferences. If no entry found, then create new entry with provided defaultValue

Get(String, Single)

Get float from Project Preferences. If no entry found, then create new entry with provided defaultValue

Get(String, String)

Get string from Project Preferences. If no entry found, then create new entry with provided defaultValue

RemoveBool(String)

Remove key item from preferences if applicable

RemoveFloat(String)

Remove key item from preferences if applicable

RemoveInt(String)

Remove key item from preferences if applicable

RemoveString(String)

Remove key item from preferences if applicable

Set(String, Boolean, Boolean)

Save bool to preferences and save to ScriptableObject with key given.

Set(String, Int32, Boolean)

Save int to preferences and save to ScriptableObject with key given.

Set(String, Single, Boolean)

Save float to preferences and save to ScriptableObject with key given.

Set(String, String, Boolean)

Save string to preferences and save to ScriptableObject with key given.

Applies to

Produkt Verzie
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0