Class RuntimeConfig | Remote Config | 1.0.9
docs.unity3d.com
    Show / Hide Table of Contents

    Class RuntimeConfig

    This class represents a single runtime settings configuration. Access its methods and properties via the ConfigManager.appConfig wrapper.

    Inheritance
    Object
    RuntimeConfig
    Namespace: Unity.RemoteConfig
    Syntax
    public class RuntimeConfig

    Properties

    assignmentID

    The Remote Config service generates this unique ID on configuration requests, for reporting and analytic purposes.

    Declaration
    public string assignmentID { get; }
    Property Value
    Type Description
    String

    A unique string.

    origin

    Retrieves the origin point from which your configuration settings loaded.

    Declaration
    public ConfigOrigin origin { get; }
    Property Value
    Type Description
    ConfigOrigin

    An enum describing the origin point of your most recently loaded configuration settings.

    Methods

    GetBool(String, Boolean)

    Retrieves the boolean value of a corresponding key, if one exists.

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

    The key identifying the corresponding setting.

    Boolean defaultValue

    The default value to use if the specified key cannot be found or is unavailable.

    Returns
    Type Description
    Boolean

    GetFloat(String, Single)

    Retrieves the float value of a corresponding key from the remote service, if one exists.

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

    The key identifying the corresponding setting.

    Single defaultValue

    The default value to use if the specified key cannot be found or is unavailable.

    Returns
    Type Description
    Single

    GetInt(String, Int32)

    Retrieves the int value of a corresponding key, if one exists.

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

    The key identifying the corresponding setting.

    Int32 defaultValue

    The default value to use if the specified key cannot be found or is unavailable.

    Returns
    Type Description
    Int32

    GetKeys()

    Returns all keys in your remote settings, as an array.

    Declaration
    public string[] GetKeys()
    Returns
    Type Description
    String[]

    GetLong(String, Int64)

    Retrieves the long value of a corresponding key from the remote service, if one exists.

    Declaration
    public long GetLong(string key, long defaultValue = 0L)
    Parameters
    Type Name Description
    String key

    The key identifying the corresponding setting.

    Int64 defaultValue

    The default value to use if the specified key cannot be found or is unavailable.

    Returns
    Type Description
    Int64

    GetString(String, String)

    Retrieves the string value of a corresponding key from the remote service, if one exists.

    Declaration
    public string GetString(string key, string defaultValue = "")
    Parameters
    Type Name Description
    String key

    The key identifying the corresponding setting.

    String defaultValue

    The default value to use if the specified key cannot be found or is unavailable.

    Returns
    Type Description
    String

    HasKey(String)

    Checks if a corresponding key exists in your remote settings.

    Declaration
    public bool HasKey(string key)
    Parameters
    Type Name Description
    String key

    The key to search for.

    Returns
    Type Description
    Boolean

    true, if the key exists, or false if it doesn't.

    In This Article
    • Properties
      • assignmentID
      • origin
    • Methods
      • GetBool(String, Boolean)
      • GetFloat(String, Single)
      • GetInt(String, Int32)
      • GetKeys()
      • GetLong(String, Int64)
      • GetString(String, String)
      • HasKey(String)
    Back to top
    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