File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,16 @@ private static void UpdateNames(UnityEditor.MenuCommand command)
103103 }
104104#endif
105105
106+ private void OnEnable ( )
107+ {
108+ SceneManager . sceneLoaded += SceneManager_sceneLoaded ;
109+ }
110+
111+ private void OnDisable ( )
112+ {
113+ SceneManager . sceneLoaded -= SceneManager_sceneLoaded ;
114+ }
115+
106116 private IEnumerator Start ( )
107117 {
108118 if ( m_BackgroundUI == null )
@@ -141,11 +151,12 @@ private IEnumerator Start()
141151
142152 // create the buttons..
143153 UpdateButtons ( ) ;
154+
144155 }
145156
146- private void OnLevelWasLoaded ( int level )
157+ void SceneManager_sceneLoaded ( Scene arg0 , LoadSceneMode arg1 )
147158 {
148- UpdateButtons ( ) ;
159+ UpdateButtons ( ) ;
149160 }
150161
151162 private void UpdateButtons ( )
You can’t perform that action at this time.
0 commit comments