Hi guys,
I’m integrating Unity Remote Config to my project.
Been trying with 1.2.3 and 1.4.0 (preview) from Package Manager, but no success.
- Unity 2019.4.10f1
- Unity Services and Analytics are enabled
- Remote Config is configured on Unity dashboard
But I always get “Remote config : Failed”.
Code snippet:
protected override void Awake()
{
ConfigManager.FetchCompleted += ApplyRemoteSettings;
ConfigManager.FetchConfigs<userAttributes, appAttributes>(new userAttributes(), new appAttributes());
}
private void OnDestroy()
{
ConfigManager.FetchCompleted -= ApplyRemoteSettings;
}
private void ApplyRemoteSettings(ConfigResponse response)
{
if (response.status == ConfigRequestStatus.Success)
{
switch (response.requestOrigin)
{
case ConfigOrigin.Default:
Debug.Log("No settings loaded this session; using default values.");
break;
case ConfigOrigin.Cached:
Debug.Log("No settings loaded this session; using cached values from a previous session.");
break;
case ConfigOrigin.Remote:
Debug.Log("New settings loaded this session; update values accordingly.");
characterSpeedRate = ConfigManager.appConfig.GetFloat("CharSpeed", characterSpeedRate);
Debug.Log("characterSpeedRate from Unity Remote Config: " + characterSpeedRate);
break;
}
}
else
{
Debug.LogError("Remote config : " + response.status);
}
public struct userAttributes
{
}
public struct appAttributes
{
}
}
Checking ConfigManagerImpl.cs I see that the code send web request to
https://config.uca.cloud.unity3d.com but this link doesn’t seem to work (“UnknownHost: config.uca.cloud.unity3d.com”).
And in that same file, in the method
OnRawResponseReturned(ConfigOrigin origin, Dictionary<string, string> headers, string body)
…I debug.log and see that body is null.
How can I solve this issue?
Thanks.