The Network Manager

Checked with version: 5.3

-

Difficulty: Intermediate

In this lesson, we will create a new Network Manager. This Network Manager will control the state of this Multiplayer project, including game state management, spawn management, scene management, matchmaking and allowing access to debugging information. For advanced users, it is possible to derive a class from NetworkManager to customize the behaviour of the Component. Extending the NetworkManager is not covered in this lesson.

To create a new Network Manager, we will create a new GameObject and add the NetworkManager and NetworkManagerHUD Components.

  • Create a new empty GameObject.
  • Rename the new GameObject “Network Manager”.
  • With the Network Manager GameObject selected:
  • ... find and add the component: Network > NetworkManager.
  • ... find and add the component: Network > NetworkManagerHUD

The NetworkManager component manages the network state of the game.

description

The NetworkManagerHUD component works with the NetworkManager and provides a simple user interface to control the network state of the game when the game is running.

description

At run-time, the NetworkManagerHUD will look like this:

description

For more details on the NetworkManager and NetworkManagerHUD, please see Using the NetworkManager.

Related documentation