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)
103
103
}
104
104
#endif
105
105
106
+ private void OnEnable ( )
107
+ {
108
+ SceneManager . sceneLoaded += SceneManager_sceneLoaded ;
109
+ }
110
+
111
+ private void OnDisable ( )
112
+ {
113
+ SceneManager . sceneLoaded -= SceneManager_sceneLoaded ;
114
+ }
115
+
106
116
private IEnumerator Start ( )
107
117
{
108
118
if ( m_BackgroundUI == null )
@@ -141,11 +151,12 @@ private IEnumerator Start()
141
151
142
152
// create the buttons..
143
153
UpdateButtons ( ) ;
154
+
144
155
}
145
156
146
- private void OnLevelWasLoaded ( int level )
157
+ void SceneManager_sceneLoaded ( Scene arg0 , LoadSceneMode arg1 )
147
158
{
148
- UpdateButtons ( ) ;
159
+ UpdateButtons ( ) ;
149
160
}
150
161
151
162
private void UpdateButtons ( )
You can’t perform that action at this time.
0 commit comments