The VR multiplayer package for Photon Pun 2. Pre-configured so you can focus on your game.
- Download the
.unitypackagefile and import it into your Unity project.
- Add Photon Pun 2 Free via the Unity Package Manager or Asset Store.
- Go to the Photon Dashboard and create a new app:
- Type: Multiplayer
- Photon SDK: PUN
- Copy your App ID.
- In Unity, go to Window > Photon Unity Networking > Pun Wizard.
- Paste your App ID into the wizard to connect.
- Add tags to your VR rig's head, left hand, and right hand.
- Drag the PhotonManager prefab into your scene.
- Configure:
- VR rig tags (head, hands).
- Auto-connect to the lobby (optional).
- Region settings for v1.1+.
- Open the Player Visual Prefab in
Assets/Resources/PhotonButDoneForYou. - Customize as needed:
- Adjust rotation offsets.
- Replace the default player model.
Tip:
If your rig doesn’t sync correctly, enable Sync Rig Using RPC in the prefab settings.
- Username text might clip through VR headsets. Adjust the Text Vertical Offset in the Player Visual Prefab.
- If objects you have added in your Player Visual Prefab do NOT sync position, rotation, Or even scale, Please try using the
SyncRigUsingRPCsetting on the Player Visual Prefab to counteract this behaviour.
-
ConnectToPhoton()v1.0+ Connects to Photon servers. -
SetUsername(string username)v1.0+ Sets the player's username. -
Disconnect()v1.0+ Disconnects from Photon. -
DestroyPlayerVisual()v1.0+ Removes the local player’s visual representation. -
SpawnPlayerVisual()v1.0+ Spawns the player’s visual in the scene. -
KickPlayer(Player player)v1.1+ Removes a player from the room. -
BanPlayer(Player player)v1.1+ Bans a player from rejoining the room.
-
Can regions communicate with each other?
- No, regions are isolated.
-
Can I use this for non-VR multiplayer?
- Yes, but it’s optimized for VR rigs.
Now you're ready to create your multiplayer VR experience with PhotonPun2ButDoneForYou. Enjoy!