Hello,
I’m using the following code to initialize the remote config :
private static async Task InitializeRemoteConfigAsync()
{
if (UnityServices.State == ServicesInitializationState.Uninitialized)
{
try
{
await UnityServices.InitializeAsync();
}
catch (Exception ex)
{
Debug.LogError("Unity service autentication faled in InitializeRemoteConfigAsync methos. Error " + ex.Message);
}
// initialize handlers for unity game services
}
// options can be passed in the initializer, e.g if you want to set analytics-user-id or an environment-name use the lines from below:
// var options = new InitializationOptions()
// .SetOption("com.unity.services.core.analytics-user-id", "my-user-id-1234")
// .SetOption("com.unity.services.core.environment-name", "production");
// await UnityServices.InitializeAsync(options);
// remote config requires authentication for managing environment information
if (!AuthenticationService.Instance.IsSignedIn)
{
try
{
await AuthenticationService.Instance.SignInAnonymouslyAsync();
}
catch (Exception ex)
{
Debug.LogError("SignInAnonymouslyAsync in InitializeRemoteConfigAsync methos. Error " + ex.Message);
}
}
}
Everything works fine on the Editor, I’m also able to retrieve the data from the remote Config backend, the problem is when I built on the device where I get the error that you can find attached, What I’m doing wrong?
If remove the authentication code, the Remote config seems to work fine but I have a lot of warnings says:
uth Service not initialized.
Request might result in empty or incomplete response