docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ConfigurationBuilder

    Container for configuration values that need to be passed to the IProjectConfiguration component at runtime.

    Inheritance
    object
    ConfigurationBuilder
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.Core.Configuration.Editor
    Assembly: Unity.Services.Core.Configuration.Editor.dll
    Syntax
    public class ConfigurationBuilder

    Methods

    SetBool(string, bool, bool)

    Stores the given value for the given key.

    Declaration
    public ConfigurationBuilder SetBool(string key, bool value, bool isReadOnly = false)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    bool value

    The value to store. It is stored as a string using InvariantCulture.

    bool isReadOnly

    Set to true to forbid game developers to override this setting.

    Returns
    Type Description
    ConfigurationBuilder

    Return this instance.

    SetFloat(string, float, bool)

    Stores the given value for the given key.

    Declaration
    public ConfigurationBuilder SetFloat(string key, float value, bool isReadOnly = false)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    float value

    The value to store. It is stored as a string using InvariantCulture.

    bool isReadOnly

    Set to true to forbid game developers to override this setting.

    Returns
    Type Description
    ConfigurationBuilder

    Return this instance.

    SetInt(string, int, bool)

    Stores the given value for the given key.

    Declaration
    public ConfigurationBuilder SetInt(string key, int value, bool isReadOnly = false)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    int value

    The value to store. It is stored as a string.

    bool isReadOnly

    Set to true to forbid game developers to override this setting.

    Returns
    Type Description
    ConfigurationBuilder

    Return this instance.

    SetString(string, string, bool)

    Stores the given value for the given key.

    Declaration
    public ConfigurationBuilder SetString(string key, string value, bool isReadOnly = false)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    string value

    The value to store.

    bool isReadOnly

    Set to true to forbid game developers to override this setting.

    Returns
    Type Description
    ConfigurationBuilder

    Return this instance.

    TryGetBool(string, out bool)

    Try to get configuration entry as bool value from an identifier.

    Declaration
    public bool TryGetBool(string key, out bool value)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    bool value

    The value to retrieve. If fail to retrieve the value is set to default.

    Returns
    Type Description
    bool

    True if the configuration exist and is boolean. False otherwise.

    TryGetFloat(string, out float)

    Try to get configuration entry as float value from an identifier.

    Declaration
    public bool TryGetFloat(string key, out float value)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    float value

    The value to retrieve. If fail to retrieve the value is set to default.

    Returns
    Type Description
    bool

    True if the configuration exist and is float. False otherwise.

    TryGetInt(string, out int)

    Try to get configuration entry as int value from an identifier.

    Declaration
    public bool TryGetInt(string key, out int value)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    int value

    The value to retrieve. If fail to retrieve the value is set to default.

    Returns
    Type Description
    bool

    True if the configuration exist and is integer. False otherwise.

    TryGetString(string, out string)

    Try to get configuration entry as string value from an identifier.

    Declaration
    public bool TryGetString(string key, out string value)
    Parameters
    Type Name Description
    string key

    The identifier of the configuration entry.

    string value

    The value to retrieve. If fail to retrieve the value is set to default.

    Returns
    Type Description
    bool

    True if the configuration exist. False otherwise.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)