'How to get Firebase RemoteConfig Parameters in unity
I want to get enter image description here this parameter. I'm trying to do this with this code FirebaseRemoteConfig.GetInstance(Firebase.FirebaseApp.DefaultInstance).GetValue("VERSION").ToString() but it's returns nothing. Also i've tryed get it with FirebaseRemoteConfig.DefaultInstance.GetValue but i have same result.
using UnityEngine;
using UnityEngine.SceneManagement;
using Firebase.RemoteConfig;
public class GameOpening : MonoBehaviour
{
Firebase.DependencyStatus dependencyStatus = Firebase.DependencyStatus.UnavailableOther;
// Use this for initialization
void Start()
{
Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => {
dependencyStatus = task.Result;
if (dependencyStatus == Firebase.DependencyStatus.Available)
{
Debug.Log(FirebaseRemoteConfig.DefaultInstance.GetValue("VERSION"));
}
else
{
Debug.LogError(
"Could not resolve all Firebase dependencies: " + dependencyStatus);
}
});
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
