diff --git a/Assets/Scripts/UnityServices/Sessions/MultiplayerServicesFacade.cs b/Assets/Scripts/UnityServices/Sessions/MultiplayerServicesFacade.cs index f909f58b8..b1e79e2d8 100644 --- a/Assets/Scripts/UnityServices/Sessions/MultiplayerServicesFacade.cs +++ b/Assets/Scripts/UnityServices/Sessions/MultiplayerServicesFacade.cs @@ -78,7 +78,7 @@ public void BeginTracking() if (!m_IsTracking) { m_IsTracking = true; - SubscribeToJoinedSessionAsync(); + SubscribeToJoinedSession(); } } @@ -91,11 +91,11 @@ public void EndTracking() if (m_IsTracking) { m_IsTracking = false; - UnsubscribeFromJoinedSessionAsync(); } if (CurrentUnitySession != null) { + UnsubscribeFromJoinedSession(); if (m_LocalUser.IsHost) { DeleteSessionAsync(); @@ -232,7 +232,7 @@ void ResetSession() // no need to disconnect Netcode, it should already be handled by Netcode's callback to disconnect } - void SubscribeToJoinedSessionAsync() + void SubscribeToJoinedSession() { CurrentUnitySession.Changed += OnSessionChanged; CurrentUnitySession.StateChanged += OnSessionStateChanged; @@ -244,7 +244,7 @@ void SubscribeToJoinedSessionAsync() CurrentUnitySession.SessionPropertiesChanged += OnSessionPropertiesChanged; } - void UnsubscribeFromJoinedSessionAsync() + void UnsubscribeFromJoinedSession() { CurrentUnitySession.Changed -= OnSessionChanged; CurrentUnitySession.StateChanged -= OnSessionStateChanged; diff --git a/CHANGELOG.md b/CHANGELOG.md index 06cf608cf..6f63ff947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Additional documentation and release notes are available at [Multiplayer Documen * Changed the way MeleeAction selects a target when there are multiple targets to collide with. The target with the highest GetTotalDamage value (mentioned above) will be selected. * Fixed a visual issue where a selected party member's party HUD slot would be displayed as selected (green) when the same or new party member joins the session in-game (#899) * Fixed Render Graph API compatibility mode warning and switched active input handling settings to "both" for removing InvalidOperationException (#901) +* Fixed error logged when unsubscribing from Session events when removed from a Session (#905) ## [2.5.0] - 2024-04-18