docs.unity3d.com
    Show / Hide Table of Contents

    Interface IProjectConfiguration

    Component for project configuration.

    Namespace: Unity.Services.Core.Configuration.Internal
    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, Boolean)

    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.

    Boolean defaultValue

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

    Returns
    Type Description
    Boolean

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

    GetFloat(String, Single)

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

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

    The identifier of the project config to find.

    Single defaultValue

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

    Returns
    Type Description
    Single

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

    GetInt(String, Int32)

    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.

    Int32 defaultValue

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

    Returns
    Type Description
    Int32

    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.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023