-
Notifications
You must be signed in to change notification settings - Fork 459
NetworkedVar data loss during scene load on soft-sync objects #267
Description
Describe the bug
If a NetworkedVar value is changed on a soft-sync object while a client is still loading the scene containing the soft-sync object. The data of the changed value could be received before the client has completed loading the scene and the client wont know what object the NetworkedVar data belonged to, since it has not spawned the object yet. The data of the changed NetworkedVar will be discarded and the NetworkedVar will no longer be in sync. Even worse, if it was an incremental data change it will have corrupted all future changes as well.
To Reproduce
Steps to reproduce the behavior:
- Create a scene that has a soft sync object with a networked var.
- Switch to that scene (make sure it is a slow scene load) and as soon as it is loaded change the NetworkedVar value.
- Observe on the client when it also has completed the scene load that the values are no longer in sync.
Expected behavior
I expect the soft sync values to be in sync even if changing their values while a client is still loading the scene.
Environment (please complete the following information):
- OS: [e.g. Windows 10]
- Unity Version: [e.g. 2018.3.7f1]
- MLAPI Version: [e.g. v10.11.1]