Describe the bug
Client-side NetworkList has duplicated values from server-side list after a specific scene flow
Initially, everything syncs correctly but after leaving the ListScene and going back, it seems that client-side NetworkList is synched with values from server and also receive add NetworkListEvents which causes the observed duplication
To Reproduce
- Clone this repository: https://github.com/elton-okawa/issue-unity-netcode-network-list-duplication
- Start an editor and a clone using
ParrelSync menu
- Start as
host in the editor
- Start as
client in the clone
- Notice that both values is correctly synched and there are logs showing current
NetworkList values
- In
host window, change the scene by clicking on DummyScene button
- In
host window, go back to the first scene by clicking on ListScene button
- Notice that
client window has duplicated values and its logs shows the same state
Actual outcome
Client-side NetworkList has 0, 1, 0, 1 values while server-side has 0, 1
Expected outcome
Client-side and server-side NetworkList with same values 0, 1
Environment:
- OS:
Windows 10
- Unity Version:
2020.3.12f1
- Netcode Version:
1.0.0-pre.4
- Unity Transport for Netcode:
1.0.0-pre.4
Describe the bug
Client-side
NetworkListhas duplicated values from server-side list after a specific scene flowInitially, everything syncs correctly but after leaving the
ListSceneand going back, it seems that client-sideNetworkListis synched with values from server and also receive addNetworkListEventswhich causes the observed duplicationTo Reproduce
ParrelSyncmenuhostin the editorclientin the cloneNetworkListvalueshostwindow, change the scene by clicking onDummyScenebuttonhostwindow, go back to the first scene by clicking onListScenebuttonclientwindow has duplicated values and its logs shows the same stateActual outcome
Client-side
NetworkListhas0, 1, 0, 1values while server-side has0, 1Expected outcome
Client-side and server-side
NetworkListwith same values0, 1Environment:
Windows 102020.3.12f11.0.0-pre.41.0.0-pre.4