Skip to content

Commit a16822d

Browse files
authored
Merge pull request #193 from watson-developer-cloud/fix-192-sceneManagerWarning
Fixed Issue #192
2 parents a74bd1a + 8e9eabe commit a16822d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Config.json.enc

0 Bytes
Binary file not shown.

Scenes/UnitTests/Scripts/MainUI.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)