Photon is a real-time multiplayer game development framework that is fast, lean and flexible. Photon consists of a server and multiple client SDKs for various use cases, programming languages and engines.
As of 2023, PUN 2 is in "maintenance mode" or "long term support mode". Major updates or support for new Unity versions beyond 2022.x are not planned. We came to the conclusion that fixing the shortcomings of PUN would lead to a new API overall. This led to creating the newer and improved Fusion SDK.
Photon Unity Network (PUN) is our take on a Unity specific, high-level solution: Matchmaking, easy to use callbacks, components to synchronize GameObjects, Remote Procedure Calls (RPCs) and similar features provide a great start. Beyond that is a solid, extensive API for more advanced control.
Full source code is available, so you can scale this package to support any type of multiplayer game you come up with.
This package is compatible with the managed Photon Cloud service, which runs Photon Servers for you. A setup window registers you (for free) in less than a minute.
Most notable features:
There is an Online Documentation, which is considered a manual for PUN. This might become your primary source for information.
This is the Reference Documentation for PUN. It summarizes the most important classes in the Public API module and explains each class, method and field individually. This is generated from the source of PUN and should be used to look up details on usage and parameters.
Aside from that, there are also Demos in the PUN package itself and a PUN Basics Tutorial online, which you should check out.
Import PUN into a new, empty project. Register via the pop up "wizard" (ALT+P) to get you a free Photon Cloud subscription (saving an initial AppId for you). Now you're ready to run and dissect the Demos.
Make sure to open and code the PUN Basics Tutorial.