3. Test your game locally

Now we can build the project and try out network replication locally. To do so, we need to launch and connect to a Replication Server.

Run a local Replication Server

You can run a local Replication Server directly on your machine! You can either:

  • Go to: coherence > Local Replication Server > Run for Rooms or Run for Worlds

  • In the Hub, open the Replication Server tab. From here, you can run a server for Rooms or Worlds:

Whether you run a Replication Server for Rooms or for Worlds depends on which setup you plan to use, which in turn requires the correct corresponding Sample UI.

Regardless of how you launch it, a new terminal window will open and display the running Replication Server:

The Replication Server running in the Terminal

If the console opens correctly and you don't see an error line (they show up in red), it means your Replication Server is running! Now you should be able to connect to it, in the game.

Run multiple instances of the game

It is often useful to be able to run multiple instances of your game on the same device. This allows you to simulate multiple player connections.

There are multiple ways to do this:

Dive into the individual pages to see our recommendation for each option.

Connect to the Replication Server

Connecting is done using our API. For now, use one of the Sample UIs we provide. You should already have one in the scene if you followed the steps in the Scene Setup section.

With the game and the RS running, you can now connect and play the game.


Last updated

Was this helpful?