I’ve got a basic setup for Unity netcode for gameobjects including a lobby, Relay and you guessed it netcode for Gameobjects.
A host sets up a lobby, a client joins the lobby and the host can then start the game. This is where it goes a bit off rails. I’ve set it up so that when the host joins the networked scene it sends a message through the lobby with the games join code. The client then automatically joins the networked game scene.
I’m developing in VR which is important for this next bit. I have the local VR rig setup in it’s own scene. It really helps to keep everything organised and makes sure the local player is never out of the experience.
When a host loads into the networked scene all is well. But if I have “Enable scene management” ticked on the NetworkManager it all goes to pot for the client. The client loads an additional XR Scene with all of the XR stuff in it and it completely breaks for the client as they now have 2 XR scenes loaded.
If I disable the “Enable Scene Management” tick box it doesn’t do this, but none of the networked objects in the networked scene spawn for the client.
I have no idea where I’m going wrong. I figure I’ll try and move the network manager to the lobby scene and then move to the networked scene after a connection is established, which is my next test.
Has anybody else has encountered this issue? How did you solve it? Am I just doing this terribly wrong?