// Use this for initialization void Start() { listSongButton = new List <GameObject>(); addButton = null; //if (Application.internetReachability == NetworkReachability.NotReachable) //{ // panelIndicator.LoadWarning("Error connecting to server. Please check your internect connection.", 10, 1); // Debug.Log("Error. Check internet connection!"); // return; //} Invoke("StartTimeOut", 15); if (LocalizationManager.instance != null) { panelIndicator.ShowIndicator(LocalizationManager.instance.GetLocalizedValue("Loading song list") + "...", "SongScrollList Start"); } DisableButtons(); FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://doremipiano-cee8a.firebaseio.com/"); Firebase.FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => { var dependencyStatus = task.Result; if (dependencyStatus == Firebase.DependencyStatus.Available) { // Set a flag here indiciating that Firebase is ready to use by your // application. InitializeFirebase(); } else { UnityEngine.Debug.LogError(System.String.Format( "Could not resolve all Firebase dependencies: {0}", dependencyStatus)); // Firebase Unity SDK is not safe to use here. } }); }
void Start() { if (string.IsNullOrEmpty(Helpers.songInfoName) || Helpers.songInfoXmlId == -1) { if (LocalizationManager.instance != null) { panelIndicator.LoadLevel(2, LocalizationManager.instance.GetLocalizedValue("Loading song list") + "..."); } return; } ButtonInstrumentVoice.SetActive(false); if (LocalizationManager.instance != null) { panelIndicator.ShowIndicator(LocalizationManager.instance.GetLocalizedValue("Generating") + " " + Helpers.songInfoName + " - " + Helpers.songInfoComposer + "...", "GetScore Start"); } noteCreator = GetComponent <NoteCreator>(); Debug.Log("songInfoName " + Helpers.songInfoName + " songInfoComposer " + Helpers.songInfoComposer + " songInfoXmlId " + Helpers.songInfoXmlId); Helpers.Score = null; FirebaseApp.DefaultInstance.SetEditorDatabaseUrl("https://doremipiano-cee8a.firebaseio.com/"); FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => { var dependencyStatus = task.Result; if (dependencyStatus == DependencyStatus.Available) { // Set a flag here indiciating that Firebase is ready to use by your // application. InitializeFirebase(); } else { Debug.LogError(String.Format( "Could not resolve all Firebase dependencies: {0}", dependencyStatus)); // Firebase Unity SDK is not safe to use here. } }); Invoke("GetSongDataTimeOut", 15); }