Unity Issue Tracker - NetworkList desynchronizes between the host and client when connecting as client from the Virtual Player
Closed
MTTB-1059
NetworkList desynchronizes between the host and client when connecting as client from the Virtual Player
Package: Multiplayer Netcode for GameObjects
As Designed
2.2.X
1.8.X
1.5.X
1.12.X
The issue is caused by the playerDataNetworkList being declared as static, which prevents proper synchronization. This behavior is expected, and removing the static modifier resolves the problem.
Reproduction steps:
1. Open the attached “IN-94559” project
2. Open the “Scenes/Lobby” Scene
3. Open the Multiplayer Play Mode window (Window > Multiplayer > Multiplayer Play Mode)
4. Activate “Player 2” Virtual Player
5. Enter the Play Mode
6. Press “Host” button in the Game View
7. Press “Client” button in the “Player 2” Game View
8. Observe both Editor and “Player 2” Console windows
Expected result: Player list count is changed to 2 (Host and Client) in both the Editor and “Player 2”
Actual result: Player list count is changed to 3 (Host, Client and Client duplicate) just in “Player 2” while the Editor player count is changed to 2