Hi, I’m relatively new to multiplayer game development, only started working with Relay and Network for GameObjects a few months ago.
What I am trying to do:
Move between the main menu scene and the main game scene.
The problem:
I have a setup with a network manager in both the menu scene and main game scene. I assumed that when switching scenes I would be able to pass the info from one to the other but it seems as though that is not the case.
The network manager keeps itself alive between scenes and that leads to some issues. I’ve thought about using only the one NetworkManager script but they hold different player prefabs with different scripts.
My question:
Any solutions that are viable apart from just rewriting everything?
a) Can I join the code for PlayerInMenu and PlayerInGame into 1 script and toggle what code runs based on which scene I am in?
b) Can I switch the player prefab when I load scenes?
c) Can I switch NetworkManagers when I load scenes?
I’m not really sure on which solution is best or if there are others I haven’t considered, I wouldn’t mind someone else’s opinion on this as I have had trouble finding anything online.