Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question InitializationOptions Option List

Discussion in 'Unity Gaming Services General Discussion' started by Tomumental, Jan 25, 2022.

  1. Tomumental

    Tomumental

    Joined:
    Nov 2, 2021
    Posts:
    11
    Hello, I am setting up UGS and am wondering if there is a piece of documentation somewhere that lists out what options are available using InitializationOptions.setOption(key, val). I've used InitializationOptions to set the environment, but have not found any other options available.
     
  2. lucbloom

    lucbloom

    Joined:
    Mar 27, 2020
    Posts:
    32
    All I can find is:
    Code (CSharp):
    1. new Unity.Services.Core.InitializationOptions()
    2.     .SetOption("com.unity.services.core.analytics-user-id", "my-user-id-1234")
    3.     .SetOption("com.unity.services.core.environment-name", "production")
     
  3. Laurie-Unity

    Laurie-Unity

    Unity Technologies

    Joined:
    Mar 5, 2020
    Posts:
    213
    Hi There,

    That is corect, there are only to options that you can set at the moment. You can also call them like this.

    Code (CSharp):
    1.        var options = new InitializationOptions();
    2.      
    3.        options.SetEnvironmentName("dev");
    4.        options.SetAnalyticsUserId("some-user-id");
    5.        await UnityServices.InitializeAsync(options);
    You will find more info in the Analytics SDK Guide.