Can't put a scene into the NetworkManager

I’m building a custom network manager, using most of Unity’s stock functions. But I’m not able to put my game scene into the “Online scene,” I did find a way to do it. By putting the game scene as 0 in the build settings. But when I built the game it loaded the game scene first, where as when I play my launcher in the editor it works properly.

So after building my build, and realizing that it loaded my game scene first, I’m back to square one, where I can’t put the scene into the “Online Scene.”

I guess I could write a new function to manage scene loading , but was hoping to use that part of the network manager, at least for now.

You just need to have both your online and offline scenes in the build settings. The first scene in the build settings will be the one that loads when you start the build, so make that your offline scene or menus or splash screen or wherever you want your players to start.

A few things to check:

  • Make sure both scenes are added to build settings
  • Make sure the scene names don’t share a suffix or prefix, for example “FooScene” and “FooScene1” would cause issues, but “FooScene” and “BarScene” would not.
2 Likes

Both of them were in the build settings, but it was only working when “Server” was scene 0.

One scene is “ServerLauncher,” the other is “Server,” so I’m guessing that would be the problem.

Thanks

Wow, so that’s one I would have never expected. Any idea on what the reasoning behind this is @fredrikholmstrom ?