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
All examples start from the main menu scene, each example scene also runs on its own.
- Open the scene
Assets/00_MainMenu/00_MainMenu.unityand enter Play Mode. - Select
THIRD PERSON CHARACTER,PLATFORMERorSHOOTER. - The game menu opens with a generated nickname and an empty
Room Namefield, change the nickname and enter a room name to play with others. - Press
Start Game, the menu closes when the session runs. - Press
EscorEnterduring play to open the game menu again, it offersDisconnectandBack to Menu.
To open an example directly, open Assets/01_ThirdPersonCharacter/01_ThirdPersonCharacter.unity, Assets/02_Platformer/02_Platformer.unity or Assets/03_Shooter/03_Shooter.unity and enter Play Mode, the game menu appears right away.
An empty room name joins a random session of the same example or creates a new one.
For a quick offline test in the editor enable Force Single Player on the UIGameMenu object of the scene, the game then starts without a connection.


Controls
Keyboard and Mouse
W,A,S,Dor the arrow keys - MoveMouse- Look aroundSpace- JumpLeft Shift- Sprint, Third Person Character and Platformer onlyLeft Mouse Button- Fire, Shooter onlyEscorEnter- Open or close the game menu
Gamepad
Left Stick- MoveRight Stick- Look aroundSouth Button- JumpLeft Stick Press- Sprint, Third Person Character and Platformer onlyWest Button- Fire, Shooter only
Touch
The on-screen controls appear on mobile platforms while the game menu is closed.
Left half of the screen- Drag the stick to moveRight half of the screen- Drag to look aroundJumpbutton - JumpDouble tapon the right half of the screen - JumpFirebutton - Fire, Shooter onlyMenubutton in the top left corner - Open or close the game menu

Building and Testing Multiplayer
The build settings of the project list the four scenes in this order: 00_MainMenu, 01_ThirdPersonCharacter, 02_Platformer and 03_Shooter.
Keep the order, UIMainMenu loads the examples by build index and UIGameMenu hands the active scene to the NetworkRunner by build index.
To test multiplayer, run a build next to the Unity Editor, start several builds on one machine or install the build on several devices.
Enter the same room name on every client and press Start Game.
Clients are only matched together when they use the same AppId, AppVersion and region and when they start the same example.
In the Shared Authority project UIGameMenu starts the NetworkRunner with GameMode.Shared, every client joins the session and controls its own player.
Multiplayer Play Mode
Each project includes the Multiplayer Play Mode package, it runs up to three Virtual Players next to the main Editor without a build.
- Open
Window > Multiplayer > Multiplayer Play Modeand activate one or more Virtual Players, each one opens in its own window. - Enter Play Mode in the main Editor, the Virtual Players enter Play Mode with it.
- Pick an example and press
Start Gamein the main Editor, the Virtual Players join the same session as clients.
After the main Editor connects, UIGameMenu sends the session name and the build index of the example scene to the Virtual Players with a Fusion Multiplayer Play Mode command (MppmJoinCommand).
Virtual Players that are still in the main menu or in another example load the example scene first.
Virtual Players that are already connected stay in their session.
The room name can stay empty, the command carries the name of the session the main Editor joined or created.
If a Virtual Player cannot connect, try to close the Unity Editor, delete the Library/VP folder in the project and try again.