Local Server Mode

We have two formats for server mode during local development: Dedicated and Shared. You can swap your development mode by pressing the toggle left of the play button:

Dedicated

Local development in dedicated mode mimics how a published game will run. In dedicated you will need one Unity editor instance for each connected client and one for the server.

We use Multiplayer Play Mode (MPPM) to manage multiple editor windows. Each window represents a different client (with one for the server).

How to setup a dedicated server using MPPM:

  1. Open menu item Window > Multiplayer Play Mode

  2. Tag Player 2 with Server (Add Tags for Player > Server)

  3. Check the box left of Player 2 (this should open your server window)

Shared

Shared mode doesn't require multiple editor windows. Instead, your single window will function as both the client and server. Both Game.IsServer() and Game.IsClient() will return true. This is useful because time-to-play becomes faster. The downside is that the game behaves differently in editor than when published on a dedicated server.

Last updated