How to mix Unity Scene management and Network Scene Management?

43 Views Asked by At

Hello i have an issue dealing with scene management and networkManager.

My game is as follow :

  1. HomeScene (no network at all)
  2. LobbyScene (NetworkManager component is created but scene is loaded using SceneManager of Unity)
  3. GameScene (using NetworkManager.SceneManager.Load("GameScene", LoadSceneMode.Single) - this works fine so far)
  4. EndGameScene (using SceneManager of unity - this doesn't work)

From GameScene (3) to EndGameScene (4) i don't need the network because i need to allow players to exit the GameScene without migrating all remaining players to EndGameScene so i can't use the NetworkManager to load the GamScene

  • The EndGameScene has no network since it's a UI recap only.

  • If the Host finishes the game first, then the remaining players must be able to complete the game in GameScene but the Host should see the EndGameScene.

  • If a Client finishes the game, then it must go in EndGameScene and disappear from the GameScene

Currently with the documentation, i am unable to find a solution to do this simple use case.

  • If i load the EndGameScene for a client, it's loaded on top of the GameScene and messes up everything
  • If i load the EndGameScene on a host, it's loading fine the EndGameScene but the clients are unable to finish the game in GameScene.
0

There are 0 best solutions below