Skip to content

Scenes loaded on the client before connecting are unloaded if the server does not have them loaded #2446

@JayPeet

Description

@JayPeet

Description

We load a scene called Client which sticks around for the entire game. It contains client specific stuff (such as the player).
We has overwrote the VerifySceneBeforeLoading on SceneManager to just allow any scene to be loaded, as a quick hack to allow us to have the Client scene loaded while having the server synchronize the loaded scenes.

As of commit e0bd7eb (PR: #2383) that functionality has been broken, since it now unloads every scene not on the server.

a TODO exists in the new DefaultSceneManagerHandler which says that we need a way to validate if an unload should happen. On my fork (https://github.com/JayPeet/com.unity.netcode.gameobjects/tree/develop) I added a VerifySceneBeforeUnloading and hook it into the DefaultSceneManagerHandlers UnloadUnassignedScenes so we can bypass it for certain scenes.

Not sure if this is how the NGO team would prefer to fix this, so no PR has been opened.

Metadata

Metadata

Labels

priority:highThis issue has high priority and we are focusing to resolve itstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions