docs.unity3d.com
    Show / Hide Table of Contents

    Struct GameSimConfigResponse

    Struct used to fetch values from keys in the GameSim run.

    Namespace: Unity.Simulation.Games
    Syntax
    public struct GameSimConfigResponse

    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

    Bool representing the value of the key. Defaults to false if the key is not found.

    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

    Float representing the value of the key. Defaults to 0f if the key is not found.

    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

    Integer representing the value of the key. Defaults to 0 if the key is not found.

    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

    Long representing the value of the key. Defaults to 0L if the key is not found.

    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

    String representing the value of the key. Defaults to "" if the key is not found.

    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