Search Results for

    Show / Hide Table of Contents

    Class EditorPrefsCache

    A cached version of UnityEditor.EditorPrefs, allowing for faster access.

    Inheritance
    System.Object
    EditorPrefsCache
    Namespace: GDX.Editor
    Syntax
    public static class EditorPrefsCache
    Remarks

    It is important to use the equivalent set methods to update the cache.

    Methods

    | Improve this Doc View Source

    GetBoolean(String, Boolean)

    Get a cached value or fill it from UnityEditor.EditorPrefs.

    Declaration
    public static bool GetBoolean(string id, bool defaultValue = true)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.Boolean value.

    System.Boolean defaultValue

    If no value is found, what should be used.

    Returns
    Type Description
    System.Boolean

    A boolean value.

    | Improve this Doc View Source

    GetColor(String, Color)

    Get a cached value or fill it from UnityEditor.EditorPrefs.

    Declaration
    public static Color GetColor(string id, Color defaultValue)
    Parameters
    Type Name Description
    System.String id

    Identifier for the UnityEngine.Color value.

    UnityEngine.Color defaultValue

    If no value is found, what should be used.

    Returns
    Type Description
    UnityEngine.Color

    A color value.

    | Improve this Doc View Source

    GetFloat(String, Single)

    Get a cached value or fill it from UnityEditor.EditorPrefs.

    Declaration
    public static float GetFloat(string id, float defaultValue = 0F)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.Single value.

    System.Single defaultValue

    If no value is found, what should be used.

    Returns
    Type Description
    System.Single

    A float value.

    | Improve this Doc View Source

    GetInteger(String, Int32)

    Get a cached value or fill it from UnityEditor.EditorPrefs.

    Declaration
    public static float GetInteger(string id, int defaultValue = -1)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.Int32 value.

    System.Int32 defaultValue

    If no value is found, what should be used.

    Returns
    Type Description
    System.Single

    An integer value.

    | Improve this Doc View Source

    GetString(String, String)

    Get a cached value or fill it from UnityEditor.EditorPrefs.

    Declaration
    public static string GetString(string id, string defaultValue = null)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.String value.

    System.String defaultValue

    If no value is found, what should be used.

    Returns
    Type Description
    System.String

    A string, or null.

    | Improve this Doc View Source

    SetBoolean(String, Boolean)

    Sets the cached value (and UnityEditor.EditorPrefs) for the id.

    Declaration
    public static void SetBoolean(string id, bool setValue)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.Boolean value.

    System.Boolean setValue

    The desired value to set.

    | Improve this Doc View Source

    SetColor(String, Color)

    Sets the cached value (and UnityEditor.EditorPrefs) for the id.

    Declaration
    public static void SetColor(string id, Color setValue)
    Parameters
    Type Name Description
    System.String id

    Identifier for the UnityEngine.Color value.

    UnityEngine.Color setValue

    The desired value to set.

    | Improve this Doc View Source

    SetFloat(String, Single)

    Sets the cached value (and UnityEditor.EditorPrefs) for the id.

    Declaration
    public static void SetFloat(string id, float setValue)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.Single value.

    System.Single setValue

    The desired value to set.

    | Improve this Doc View Source

    SetInteger(String, Int32)

    Sets the cached value (and UnityEditor.EditorPrefs) for the id.

    Declaration
    public static void SetInteger(string id, int setValue)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.Int32 value.

    System.Int32 setValue

    The desired value to set.

    | Improve this Doc View Source

    SetString(String, String)

    Sets the cached value (and UnityEditor.EditorPrefs) for the id.

    Declaration
    public static void SetString(string id, string setValue)
    Parameters
    Type Name Description
    System.String id

    Identifier for the System.String value.

    System.String setValue

    The desired value to set.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Built on 2024-01-01 against 1f69a68.
    Generated by Dox+DocFX.