Photon Unity Networking 2  2.14
English | 日本語 | 한국
General Documentation

Table of Contents

Brief overview of Photon, subscriptions, hosting options and how to start.

Photon Unity Networking - First steps

When you import PUN, the "Wizard" window will pop up. If not, find it in the Window menu as "Photon Unity Networking". In the Wizard, either enter your email address to register for the Photon Cloud, enter the AppId of an existing account or skip this step for the time being.

The Wizard creates a configuration in the project, named: PhotonServerSettings.

PUN consists of quite a few files, however most functionality is concentrated into: Photon.Pun.PhotonNetwork. This class contains all functions and variables typically needed. If you ever have custom requirements, you can always modify the source files - this plugin is just an implementation of Photon after all.

To learn how this API works, visit the online documentation for PUN

Photon

Photon Unity Networking (PUN) always connects to a dedicated Photon server, which provides matchmaking, load balancing and in-room communication for players.

Behind the scenes PUN uses more than one server: A "Name Server" acts as point of entry and provides a list of regional "Master Servers". A Master Server keeps track of rooms and provides the Matchmaking, while several "Game Servers" run the actual rooms (matches).

Exit Games Cloud

The Exit Games Cloud provides hosted and load balanced Photon servers for you, fully managed by Exit Games. Free trials are available and subscription costs for commercial use are competitively low.

The Public Cloud service runs a fixed logic, so the clients need to be authoritative.

Clients are separated by “application id” (identifies your game title) and a “game version”. Changing the game version helps separate players with new and old client builds.

Subscriptions bought in Asset Store

Follow these steps when you bought an asset that includes a Photon Cloud subscription:

Find your Unity Invoice Number in the Unity AssetStore:
https://www.assetstore.unity3d.com/en/#!/account/transactions
From the drop-down select the payment method used in your purchase.
Navigate to your purchase and copy the number following the "#" symbol (excluding the "#" and spaces).

Photon Server SDK

As alternative to the Photon Cloud service, you can run your own server and develop server side logic on top of our "Load Balancing" C# solution. This gives you full control of the server logic.

The Photon Server SDK can be downloaded at this link

Read about how to start the server here.