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
- Win64 CPU is set to None when applying changes to plugin where the meta has the serializedVersion 2
- Sprite Atlas textures from all included build scenes persist in Editor memory when building the Player
- Disabling all columns in Light Explorer throws “ArgumentException” error in the Console window
- Multiple errors are thrown in the console while using perforce when moving an asset using shortcuts
- PlayerPropertiesChanged event fires before Player Properties are applied
Add comment