Caution: Fraudulent or imitation websites may appear. Only this site is official. Report concerns on our Report Fraud page.
Setting up Photon is the first step in enabling multiplayer for your VR fangame.
Photon handles real‑time networking, room creation, player syncing, and communication between all players in a session.
This page explains how to install Photon, connect your Unity project, and prepare your game for multiplayer.
1. What You Need Before Starting
Before setting up Photon, make sure you have:
A Unity project
A Photon account
A Photon App ID
Your VR rig or player prefab ready to be networked
Once these are ready, you can connect your game to Photon’s servers.
2. Installing Photon in Unity
A. Using the Unity Asset Store
Open Unity
Go to Window → Asset Store
Search for Photon PUN 2
Download and import it
B. Using the Package Manager
Open Window → Package Manager
Click +
Select Add package from disk
Choose the Photon package folder
Once imported, Photon will automatically open a setup window.
3. Connecting Your Project to Photon
Create a Photon account at the Photon Dashboard
Create a new Photon App (PUN)
Copy your App ID
In Unity, open PhotonServerSettings
Paste your App ID
Select your default region (usually us or usw)
Save your settings
Your project is now linked to Photon’s cloud servers.
4. Basic Multiplayer Flow in Photon
Photon uses a simple and predictable flow:
Connect to Photon
Join a lobby
Create or join a room
Spawn the player prefab
Sync head, hands, and cosmetics
Handle room logic
Disconnect when leaving
This flow is the foundation of all multiplayer behavior.
5. Setting Up the Player Prefab
Your player prefab must include:
PhotonView (required for networking)
PhotonTransformView or custom sync scripts
VR rig (head + hands)
Cosmetic loader
Custom property sync
This prefab is spawned when the player joins a room.
6. Photon Settings You Should Configure
Inside PhotonServerSettings, configure:
App ID
Region
Send Rate (30–60 recommended for VR)
Serialization Rate
Auto‑Sync Scene (usually off for VR)
Lobby type
Room TTL (time to live)
These settings affect performance, stability, and bandwidth usage.
7. Best Practices for Setting Up Photon
Use PlayFabID as Photon UserID
Keep send rates reasonable
Use custom properties for cosmetics and player data
Use room properties for game mode settings
Avoid sending large data packets
Use RPCs sparingly
Use Photon events for global actions
Keep your player prefab lightweight