I am using Remote Settings with Unity 2017.2.1f1 (I can’t use Unity 2017.3) and when I try to use Segmentation by platform Unity Remote Settings always return the value in “All Current Users” I have create a simple example to this post where the error is easy to check:
Here are the logs returned by the Code sample below:
iOS real device:
- remoteUpdates → 1 Platform: All Current Users
iOS Unity Editor:
- remoteUpdates → 1 Platform: All Current Users
Real Android Device:
- remoteUpdates → 1 Platform: All Current Users
Android Unity Editor:
- remoteUpdates → 1 Platform: All Current Users
I’m sure I am doing something wrong but I can’t guess what. It’s very important for us because we are using it to filter AssetBundles that are not independent from the platform.
Thanks in advance.
Here is the Simple Sample:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TestReadRemoteSettings : MonoBehaviour {
[SerializeField]
Text text;
int remoteUpdates = 0;
public
// Use this for initialization
void Start() {
RemoteSettings.Updated += new RemoteSettings.UpdatedEventHandler(HandleRemoteUpdate);
HandleRemoteUpdate ();
}
public void HandleRemoteUpdate ()
{
remoteUpdates++;
string remoteTestValue = RemoteSettings.GetString ("Test", "No init");
Debug.Log ("1. remoteUpdates --> "+remoteUpdates+" Platform: "+remoteTestValue);
text.text = remoteTestValue;
}
}