Skip to content

NetworkedVar data loss during scene load on soft-sync objects #267

@jaglitegrann

Description

@jaglitegrann

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:

  1. Create a scene that has a soft sync object with a networked var.
  2. Switch to that scene (make sure it is a slow scene load) and as soon as it is loaded change the NetworkedVar value.
  3. 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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions