Getting Started
Project Setup
Each download is a complete Unity project.
- Unzip the downloaded package and open the project folder with Unity
6000.3.18f1. - Create a Fusion 2 AppId following Creating a Fusion 2 AppId.
- Open
Tools > Fusion > Realtime Settingsand paste the AppId into theApp Id Fusionfield of the selectedPhotonAppSettingsasset.
Running in Editor
Both projects start from the Menu scene.
- Open the scene
Assets/Scenes/Menu.unityand enter Play Mode. - Enter a nickname and a room name. An empty nickname field uses the generated
Playername shown in the field. - Start the session:
- In the Client Host project,
START HOSTstarts the session as host or joins it as a client when a session with the room name already runs.START CLIENTjoins as a client. - In the Shared Authority project,
STARTjoins the session or creates it.
- In the Client Host project,
- The
Gamescene loads with the pre-game screen. The host, or the master client in the Shared Authority project, pressesStart game, the other players seeWaiting for hostorWaiting for master. - The round lasts 180 seconds and ends earlier when every ship is out of lives. The winner screen shows the player with the highest score, remaining lives break a tie. After 4 seconds every client returns to the menu.


Controls
Keyboard and Mouse
WorUp Arrow- Thrust forwardSorDown Arrow- Thrust backwardA,DorLeft Arrow,Right Arrow- RotateLeft Mouse ButtonorEnter- Fire, one shot per press
Building and Testing Multiplayer
The build settings list the Menu and Game scenes in this order.
Keep both scenes in the list, StartMenu stops with an error when the Game scene is missing.
To test multiplayer, run a build next to the Unity Editor or start several builds on one machine.
Enter the same room name on every client and join before the round starts, GameManager.StartGame closes the session to new players.
Clients are only matched together when they use the same AppId, AppVersion and region.
In the Client Host project StartMenu starts the NetworkRunner with GameMode.AutoHostOrClient for START HOST, the first client of a session becomes the host and later clients connect to it.
START CLIENT uses GameMode.Client.
In the Shared Authority project StartMenu starts the NetworkRunner with GameMode.Shared, every client joins the session and controls its own spaceship.
Last updated on
Back to top