Search Issue Tracker
Active
Votes
0
Found in
2.0.0
Issue ID
UUM-137561
Regression
No
PlayerPropertiesChanged event fires before Player Properties are applied
- When a player updates their properties (In the test case setting an "inviting" key with a join code), all other players in the session receive the PlayerPropertiesChanged event correctly but reading the updated properties inside the event handler returns empty or stale data. The updated values only become visible on the next read (one frame later).
I looked at the stack trace and saw that in LobbyCallbacks between UpdateLobbyCache and InvokeLobbyChange the data is lost. Screenshots provided below
Steps to reproduce:
#
## Create a session with 2+ players using MultiplayerService.Instance.CreateSessionAsync / JoinSessionAsync.
## Subscribe all players to session.PlayerPropertiesChanged.
## Have one player update their properties: e.g. await session.SetPlayerPropertyAsync("inviting", new SessionProperty("join-code-value", VisibilityPropertyOptions.Member)).
## In the PlayerPropertiesChanged handler on a non-updating player, immediately read session.Players[<updatingPlayerId>].Properties["inviting"].
Actual results: session.Players[id].Properties does not contain the new key/value when read directly inside the handler. The property becomes visible only
if read on the next frame (or after a delay), because changes have not been executed yet when the event fires.
Expected results: The updated property value ("join-code-value") is accessible inside the PlayerPropertiesChanged handler the moment it fires.
Reproducible with versions: com.unity.services.multiplayer 2.0.0
Not reproducible with versions:
Can’t test with versions:
Tested on (OS):
Notes:
*
**
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Performance Markers Search window shows an empty entry in the list
- Enabling Deep Profiling in Performance Markers Search window breaks Inspector panel buttons when navigating through the marker items
- Dragging selector from selector row background shows preview but does not apply class in UI Builder
- An "InvalidOperationException" error is thrown when TryRemoveItem is used with rebuildTree set to false
- Build fails with IL2CPP error when building on Android platform in a specific project
Add comment