docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IProjectConfiguration

    Component for project configuration.

    Namespace: Unity.Services.Core.Configuration.Internal
    Assembly: Unity.Services.Core.Internal.dll
    Syntax
    public interface IProjectConfiguration : IServiceComponent
    Remarks

    For WebGL platform, the configuration is only accessable if the application is hosted behind https. Behind http you will get an error: Insecure connection not allowed.

    Methods

    GetBool(string, bool)

    Get the boolean value for the project config key.

    Declaration
    bool GetBool(string key, bool defaultValue = false)
    Parameters
    Type Name Description
    string key

    The identifier of the project config to find.

    bool defaultValue

    The value returned if there is no match for the given key.

    Returns
    Type Description
    bool

    Return the boolean value for the project config for the given key if any; return defaultValue otherwise.

    GetFloat(string, float)

    Get the float value for the project config with the given key.

    Declaration
    float GetFloat(string key, float defaultValue = 0)
    Parameters
    Type Name Description
    string key

    The identifier of the project config to find.

    float defaultValue

    The value returned if there is no match for the given key.

    Returns
    Type Description
    float

    Return the float value for the project config for the given key if any; return defaultValue otherwise.

    GetInt(string, int)

    Get the integer value for the project config with the given key.

    Declaration
    int GetInt(string key, int defaultValue = 0)
    Parameters
    Type Name Description
    string key

    The identifier of the project config to find.

    int defaultValue

    The value returned if there is no match for the given key.

    Returns
    Type Description
    int

    Return the integer value for the project config for the given key if any; return defaultValue otherwise.

    GetString(string, string)

    Get the string value for the project config with the given key.

    Declaration
    string GetString(string key, string defaultValue = null)
    Parameters
    Type Name Description
    string key

    The identifier of the project config to find.

    string defaultValue

    The value returned if there is no match for the given key.

    Returns
    Type Description
    string

    Return the string value for the project config for the given key if any; return defaultValue 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)