Multiplayer Development HUD
The multiplayer DEV HUD is a small utility that makes your life a lot easier when developing with multiplayer.
Just add the “MultiplayerDevUI” prefab to your scene. If it’s your sole UI, then just add an EventManager to it. When the scene is started, the UI will shown on the right top corner.
The UI has four fields that can be used:
- MODE: In the first drop down you can choose from CLIENT, SERVER or HOST. This will start then the game in the selected mode.
- SCENE: The second drop down will show you all registered Scenes in the build settings. You can choose which scene you want to load when pressing start
- PLAYER NAME: In the third field you can fill in the player name. This name will be set on the spawned player later on. It is irrelevant for the Server mode.
- JOIN CODE: If you change the NetworkManager into Relay Mode, this JOIN Code will be used to connect a Client.
After pressing START, the parameters choose will be transferred into the ClientPlayerData and the selected Scene is loaded. The GameController Component in the scene takes care of loading the right stuff. If the scene is loaded all fields are grey and show your chosen selections.
This can be used in the Editor as well as in the Standalone Builds, which makes it so useful. You can use the same build for starting two servers and at the same time have the client run in the editor.