Testing Locally

The easiest way to test the game, right after downloading the asset, is to build the game client (with Menu as first scene). And then run it twice on your PC. You can Host with one, and Join the game on local ip (127.0.0.1) on the other one.

Creating Two Projects

Creating two Projects Even if creating a build is the simplest way to test the game, it is not the most efficient method. While working on your game, you may want to iterate quickly and test many times a feature, without having to create a new build for every single change. By default, Unity does not allow to open the same project twice, but there is a trick to allow this. It is probably possible to do it on Mac and Linux, but the following will explain how to do it on Windows: Create a new empty project folder outside of the original project folder

Then, copy these folders from the original project to the new project: Packages, ProjectSettings, UserSettings (but not Assets)

Open the command prompt in admin mode (click on start, type “cmd” in the search, then right click on command prompt, and “run as admin”. Change to your new project folder by typing

cd C:\Marc\Unity\SurvivalEngine2

(replace with the path to your new folder)

Create a simlink to the Assets folder using this command

mklink /D Assets C:\Marc\Unity\SurvivalEngine\Assets

Replace by the path with the Assets folder of your original project. The /D options means it’s a directory and not a file. Note: If your path has spaces or special characters, you may need to put the path in between quotations : "C:\Marc\My Projects\Survival Engine\Assets"

Done! You can now open both projects in Unity. Whenever you change any file inside Assets, it will automatically change it in the other project. The project settings won’t be the same, but it allows you to setup the build settings differently in each project (could be one for the client, one for the game server).

From Unity, you can run the game directly from any scene (without going through the menu). Doing so will start the game as a “Host”, which also includes single player.

If you want to join another player, you need to go through the Menu, and click join.

Last updated