mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    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
    Object
    ProjectPreferences
    Implements
    ScriptableObject
    Namespace: Microsoft.MixedReality.Toolkit.Utilities.Editor
    Assembly: cs.temp.dll.dll
    Syntax
    public class ProjectPreferences : ScriptableObject, ScriptableObject

    Properties

    FilePath

    Declaration
    protected static string FilePath { get; }
    Property Value
    Type Description
    String

    FilePath

    Declaration
    protected static string FilePath { get; }
    Property Value
    Type Description
    String

    Methods

    Get(String, Boolean)

    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
    Type Name Description
    String key
    Boolean defaultValue
    Returns
    Type Description
    Boolean

    Get(String, Boolean)

    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
    Type Name Description
    String key
    Boolean defaultValue
    Returns
    Type Description
    Boolean

    Get(String, Int32)

    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
    Type Name Description
    String key
    Int32 defaultValue
    Returns
    Type Description
    Int32

    Get(String, Int32)

    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
    Type Name Description
    String key
    Int32 defaultValue
    Returns
    Type Description
    Int32

    Get(String, Single)

    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
    Type Name Description
    String key
    Single defaultValue
    Returns
    Type Description
    Single

    Get(String, Single)

    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
    Type Name Description
    String key
    Single defaultValue
    Returns
    Type Description
    Single

    Get(String, String)

    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
    Type Name Description
    String key
    String defaultValue
    Returns
    Type Description
    String

    Get(String, String)

    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
    Type Name Description
    String key
    String defaultValue
    Returns
    Type Description
    String

    RemoveBool(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveBool(string key)
    Parameters
    Type Name Description
    String key

    RemoveBool(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveBool(string key)
    Parameters
    Type Name Description
    String key

    RemoveFloat(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveFloat(string key)
    Parameters
    Type Name Description
    String key

    RemoveFloat(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveFloat(string key)
    Parameters
    Type Name Description
    String key

    RemoveInt(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveInt(string key)
    Parameters
    Type Name Description
    String key

    RemoveInt(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveInt(string key)
    Parameters
    Type Name Description
    String key

    RemoveString(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveString(string key)
    Parameters
    Type Name Description
    String key

    RemoveString(String)

    Remove key item from preferences if applicable

    Declaration
    public static void RemoveString(string key)
    Parameters
    Type Name Description
    String key

    Set(String, Boolean, Boolean)

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

    Declaration
    public static void Set(string key, bool value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    Boolean value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Set(String, Boolean, Boolean)

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

    Declaration
    public static void Set(string key, bool value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    Boolean value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Set(String, Int32, Boolean)

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

    Declaration
    public static void Set(string key, int value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    Int32 value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Set(String, Int32, Boolean)

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

    Declaration
    public static void Set(string key, int value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    Int32 value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Set(String, Single, Boolean)

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

    Declaration
    public static void Set(string key, float value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    Single value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Set(String, Single, Boolean)

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

    Declaration
    public static void Set(string key, float value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    Single value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Set(String, String, Boolean)

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

    Declaration
    public static void Set(string key, string value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    String value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Set(String, String, Boolean)

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

    Declaration
    public static void Set(string key, string value, bool forceSave = true)
    Parameters
    Type Name Description
    String key
    String value
    Boolean forceSave
    Remarks

    If forceSave is true (default), then will call AssetDatabase.SaveAssets which saves all assets after execution

    Implements

    ScriptableObject
    In This Article
    • Properties
      • FilePath
      • FilePath
    • Methods
      • Get(String, Boolean)
      • Get(String, Boolean)
      • Get(String, Int32)
      • Get(String, Int32)
      • Get(String, Single)
      • Get(String, Single)
      • Get(String, String)
      • Get(String, String)
      • RemoveBool(String)
      • RemoveBool(String)
      • RemoveFloat(String)
      • RemoveFloat(String)
      • RemoveInt(String)
      • RemoveInt(String)
      • RemoveString(String)
      • RemoveString(String)
      • Set(String, Boolean, Boolean)
      • Set(String, Boolean, Boolean)
      • Set(String, Int32, Boolean)
      • Set(String, Int32, Boolean)
      • Set(String, Single, Boolean)
      • Set(String, Single, Boolean)
      • Set(String, String, Boolean)
      • Set(String, String, Boolean)
    • Implements
    Back to top Generated by DocFX