A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues/2454 below:

NetworkList contains duplicate entries when its NetworkObject becomes visible to Client · Issue #2454 · Unity-Technologies/com.unity.netcode.gameobjects · GitHub

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
  1. Instantiate a NetworkObject no, set no.CheckObjectVisibility = (clientId) => false, and spawn the NetworkObject (which is now hidden to all Clients).
  2. On the Server, add an entry in a NetworkList that's attached to the NetworkObject. Check its contents on the Server.
  3. Make the NetworkObject visible to a Client. Check the contents of the NetworkList 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4