Skip to content

DontDestroyOnLoad NetObjects is throwing an excpetion in SceneManagement #1088

Closed
@VALERE91Unity

Description

@VALERE91Unity

Describe the bug
Exception when LoadingScene with DontDestroyOnLoad NetObjects

To Reproduce
Steps to reproduce the behavior:

  1. Call DontDestroyOnLoad on a NetObject in one scene
  2. Call NetworkManager SceneManagement.LoadScene() on the server
  3. See error

Actual outcome
When you have NetObjects in DontDestroyOnLoad mode and you are switching scene an exception is fired in the SceneManagement part of NetCode.

Expected outcome
The scene should change without exception with the DontDestroyOnLoad NetObjects preserved.

Environment (please complete the following information):

  • OS: MacOS 11.5.2
  • Unity Version: 2020.3 and 2021.1
  • NetCode Version: 0.2.0
  • NetCode Commit: 4c166a6

Additional context
Exception : Exception: [SceneEventData- Scene Handle Mismatch] serverSceneHandle could not be found in ServerSceneHandleToClientSceneHandle

Callstack :
image

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions