void OnDestroy() { if (_instance == this) { _instance = null; } }
void Awake() { if (_instance != null) { Debug.LogError("FCDownloadManager: Another FCDownloadManager has already been created previously. " + gameObject.name + " is goning to be destroyed."); Destroy(this); return; } _instance = this; DontDestroyOnLoad(this); }
void OnChangeServerCallback(ID_BUTTON buttonID) { if (buttonID == ID_BUTTON.ID_OK) { FCDownloadManager.SaveServerSelected(false); CharacterSelector.IsForceToSelectServer = true; Application.LoadLevel("character_selection"); _UIIsActive = false; } }