Skip to content

Commit f3557c7

Browse files
unregister profile manager callback when leaving main menu (#655)
1 parent ee7e376 commit f3557c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assets/BossRoom/Scripts/Game/Client/State/ClientMainMenuState.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ void OnSignInFailed()
109109
}
110110
}
111111

112+
public override void OnDestroy()
113+
{
114+
m_ProfileManager.onProfileChanged -= OnProfileChanged;
115+
base.OnDestroy();
116+
}
117+
112118
async void OnProfileChanged()
113119
{
114120
m_LobbyButton.interactable = false;

0 commit comments

Comments
 (0)