//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// /// <summary> /// When the Unity GameObject and all children are ready /// </summary> internal void Awake() { if (m_MainView == null) { m_MainView = BeatSaberUI.CreateViewController <ManagerMain>(); } if (m_LeftView == null) { m_LeftView = BeatSaberUI.CreateViewController <ManagerLeft>(); } if (m_DetailView == null) { m_DetailView = BeatSaberUI.CreateViewController <ManagerDetail>(); } m_MainView.FlowCoordinator = this; }
/// <summary> /// On destroy /// </summary> internal void OnDestroy() { if (m_MainView != null) { GameObject.Destroy(m_MainView.gameObject); m_MainView = null; } if (m_LeftView != null) { GameObject.Destroy(m_LeftView.gameObject); m_LeftView = null; } if (m_DetailView != null) { GameObject.Destroy(m_DetailView.gameObject); m_DetailView = null; } }