-
Notifications
You must be signed in to change notification settings - Fork 455
Closed
Labels
type:bugBug ReportBug Report
Description
Description
When network visibility of a NetworkObject
changes from hidden to visible for a Client and the NetworkObject
contains a NetworkList
, the list contains duplicate entries when it's synced from Server to Client.
Steps to Reproduce
- Instantiate a
NetworkObject no
, setno.CheckObjectVisibility = (clientId) => false
, and spawn theNetworkObject
(which is now hidden to all Clients). - On the Server, add an entry in a
NetworkList
that's attached to theNetworkObject
. Check its contents on the Server. - Make the
NetworkObject
visible to a Client. Check the contents of theNetworkList
on the Client. Notice that it contains the added entry in it twice instead of once.
I haven't reproduce this on a small test project and the steps above might not be exactly correct. Try adding/removing items from the NetworkList before and after making the NetworkObject visible to the Client and check if it's synced correctly.
Expected Outcome
NetworkList
is always synchronized correctly from Server to Client.
Environment
- OS: Windows 10
- Unity version: 2021.3.19f1
- Netcode version: 1.2.0
Metadata
Metadata
Assignees
Labels
type:bugBug ReportBug Report