Local testing using builds
An easy way to test your game locally is to simply create a build, and open several instances of it.
You can also connect the Editor alongside the builds, with the extra benefit of being able to inspect the hierarchy and the state of its GameObjects.
Pros
Easy to distribute amongst team members and testers
Well-understood workflow
Can test with device-specific constraints (smartphones, consoles, ...)
Cons
Not the shortest iteration time, as you need to continuously make builds
Harder to debug on the builds (requires custom tooling on your side to do so)
Steps to create a build
Make sure you've read through Local Development and have started a Local Replication Server.
Let's create a standalone build. Before we do so, check a few settings:
In Project Settings > Player make sure that the Run in Background option is checked.
Go to Project Settings > Player and change the Fullscreen Mode to Windowed and enable Resizable Window. This will make it much easier to observe standalone builds side-by-side when testing networking.
With these in place, we're ready to build.
Open the Build Settings window (File > Build Settings). Click on Add Open Scenes to add the current scene to the build.
Click Build and Run.
When the build is done, start another instance of the executable (or run the project in Unity by just hitting Play).
Click Connect in the connection UIs on both clients. Now, try focusing on one and using WASD keys. You will see the box move on the other side as well.
Last updated