Exemple #1
0
 /// <summary>
 /// When a component with RemoteConfigSyncBehaviour is created, sync its field values
 /// with the values in RemoteConfig.
 /// </summary>
 private void Start()
 {
     // Find all the fields that require syncing in the other components of this GameObject.
     FirebaseInitializer.RemoteConfigActivateFetched(() => {
         readyToSync = true;
     });
 }
Exemple #2
0
 private void Start()
 {
     //// Utilizing Firebase Initializer from Leaderboard example
     FirebaseInitializer.Initialize(dependencyStatus => {
         if (dependencyStatus == DependencyStatus.Available)
         {
             auth = Firebase.Auth.FirebaseAuth.DefaultInstance;
             InitializeFirebase();
             DynamicLinks.DynamicLinks.DynamicLinkReceived += OnDynamicLink;
             readyToSignin = true;
         }
         else
         {
             Debug.LogError("Could not resolve all Firebase dependencies: " + dependencyStatus);
         }
     });
 }
Exemple #3
0
 /// <summary>
 /// Called when Confirm is clicked from within ConfirmClearPanel. Waits for the
 /// LeaderboardController to be in the Initialized state, then removes the
 /// AllScoreDataPath from the database.
 /// </summary>
 public void ClearScores()
 {
     ToggleClearScoresConfirm(false);
     FirebaseInitializer.Initialize(status => {
         if (status != DependencyStatus.Available)
         {
             MessageText.text = "Failed to initialize Firebase Database. DependencyStatus: " + status;
             return;
         }
         leaderboard.dbref.Child(leaderboard.AllScoreDataPath).RemoveValueAsync().ContinueWith(
             task => {
             if (task.Exception != null)
             {
                 throw task.Exception;
             }
         });
     });
 }
 public void ForceRefresh()
 {
     FirebaseInitializer.RemoteConfigActivateFetched(() => { }, true);
 }