(Unity) Remote Config not working??

562 views
Skip to first unread message

isnani widhi hidayat

unread,
Aug 19, 2017, 11:06:24 AM8/19/17
to Firebase Google Group
Any One can tell me why it's not working


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Firebase.RemoteConfig;
using System.Threading.Tasks;
using UnityEngine.UI;

public class zTest : MonoBehaviour {

    public Text serverText;

    Dictionary<string, object> defaults = new Dictionary<string, object>();
    ConfigValue configValue;

    string serverAddress {
        set {
            serverText.text = value;
        }
    }

void Start () {
        defaults.Add("ServerAddress","0.0.0.1");
        FirebaseRemoteConfig.SetDefaults(defaults);
        FirebaseRemoteConfig.Settings = new ConfigSettings() { IsDeveloperMode = true};
        configValue = FirebaseRemoteConfig.GetValue("ServerAddress");
        serverAddress = configValue.StringValue;
    }

    public void ActivateFetch() {
        FirebaseRemoteConfig.ActivateFetched();
        configValue = FirebaseRemoteConfig.GetValue("ServerAddress");
        serverAddress = configValue.StringValue;
    }
}

Stewart Miles

unread,
Aug 21, 2017, 1:43:48 PM8/21/17
to Firebase Google Group
You need to fetch before activating the fetched data, see our sample:

Cheers,
Stewart

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/523f30d8-6aa7-404a-9cdf-f0c3c4ed768a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages