void HandleConfigValues(object sender, ValueChangedEventArgs args) { if (args.DatabaseError != null) { Debug.LogError(args.DatabaseError.Message); } else { if (args.Snapshot != null && args.Snapshot.ChildrenCount > 0) { foreach (var childSnapshot in args.Snapshot.Children.Reverse()) { if (childSnapshot.Child("enable_tappx") == null || childSnapshot.Child("enable_tappx").Value == null) { Debug.Log("<color=red>Bad data in sample. No Data or Did you forget to call SetEditorDatabaseUrl with your project id?</color>"); GameManager.instance.SetServicesConfiguration(false); break; } else { #if !UNITY_EDITOR ServicesConfiguration.enable_tappx = bool.Parse(childSnapshot.Child("enable_tappx").Value.ToString()); #endif ServicesConfiguration.mainscreen_video_is_rewarded = bool.Parse(childSnapshot.Child("mainscreen_video_is_rewarded").Value.ToString()); ServicesConfiguration.sendscore_video_is_rewarded = bool.Parse(childSnapshot.Child("sendscore_video_is_rewarded").Value.ToString()); Debug.Log(ServicesConfiguration.DataToString()); GameManager.instance.SetServicesConfiguration(true); } } } } }