This document is about: PUN 1
SWITCH TO

PUN Classic (v1), PUN 2 and Bolt are in maintenance mode. PUN 2 will support Unity 2019 to 2022, but no new features will be added. Of course all your PUN & Bolt projects will continue to work and run with the known performance in the future. For any upcoming or new projects: please switch to Photon Fusion or Quantum.

Overview

The PUN packages from the Asset Store include several demos. None is a full-blown game but each shows a practical setup of scenes and prefabs for some aspect of a multiplayer game.

Below, we highlight a few demos of the PUN Free and PUN+ package.

Download Photon Unity Networking Free

pun demos
PUN Demos

The Hub Scene

When you import PUN into a new, empty project, this scene should be loaded automatically. If not, use Unity's menu:

"Window" -> "Photon Unity Networking" -> "Configure Demos (build setup)".

All included demos can be started from this "Hub Scene". You just need to setup your AppID, build and run.

photon unity networking free
Photon Unity Networking SDK

You can run the Hub in the Editor as well. Some demos use the Console of Unity to log hints. Double click a Console output line and you usually get to the code that printed it.

To learn more about the demos, open their individual scenes, too.

Basics

Boxes Demo

photon unity networking free
PUN Boxes Demo

Highlights:

  • Quick and easy random matchmaking (JoinRandomRoom and CreateRoom)
  • Instantiation of prefabs. InstantiateSceneObject
  • Position and rotation synchronization in fixed updates

Worker Demo

photon unity networking free
PUN Worker Demo

Highlights:

  • Room listing in lobby (with old UI)
  • Instantiation of a player character
  • Synchronization of character state and animation
  • In-room Chat with RPCs

Synchronization Demo

photon unity networking free
PUN Synchronization Demo

Highlights:

  • Shows and compares several algorithms for position-update smoothing
  • Requires keyboard input

Advanced

Onwership Transfer Demo

photon unity networking free
PUN Ownership Demo

Highlights:

  • Uses Ownership Transfer options of PhotonView
  • Allows to take over control of a GameObject
  • Enables current owner to reject control-requests
  • Highlights owned GameObjects with a "pin" above
  • More details

Pickup, Teams, Score

photon unity networking free
PUN Pickup, Team and Scores Demo

Highlights:

  • Provides a simple solution for pickups of items (even concurrent ones)
  • Synchronizes the timing when an item gets respawned
  • Uses Custom Properties to store a player's team and score
  • Uses Class Extensions to easily set and access Custom Properties

Feature Demos

Mecanim Demo

photon unity networking free
PUN Mecanim Demo

Highlights:

  • Animation synchronization with Animator View Component
  • Smooth position updates for a mecanim character
  • More details

Friends & Authentication Demo

photon unity networking free
PUN Custom Authentication Demo

Highlights:

  • Friend Finding (with fake usernames)
  • Custom authentication (optional)
Back to top