• Photon PUN Choose the #1 Platform for Unity Multiplayer.

    Photon PUN Packing
    • “My hero!”
    • “Deserves five stars”
    • “Works flawlessly”
    • “A life saver!”
    • “10/10 - Doesn't get easier”
  • Photon is going great for us! We've released an Armello multiplayer alpha to Kickstarter backers this week, and Photon has been a great backbone ... it's been easy to get set up.

    Jason Bakker, League of Geeks
  • Photon PUN Choose the #1 Platform for Unity Multiplayer.

    Photon PUN Packing
    • No servers needed. Runs in the Photon Cloud (EU, US & Asia).
    • Fully integrated with Unity
    • Works with all Unity exports: Browser, PC, Mobile and Console.
    • 5 Star Rating in the Unity Asset Store
    • All features of Photon Realtime

Photon Realtime Features

Develop and launch realtime multiplayer games globally whether you are an indie developer or a AAA studio.

Realtime

Photon Cloud is available globally to guarantee low latency and shortest round-trip times for your multiplayer games worldwide.

Multiplayer

We offer you the required messaging rates reliably. Our realtime SaaS is the right choice for you whether with TCP, HTTP, Websockets or RUDP.

Cross-Platform

You won't find a backend supporting more platforms.
Find the supported SDKs down here .
Q.E.D.

Highly Scalable

Distributed worldwide Photon Cloud scales seamless and automatically even for tens of thousands of concurrent users.
Proven. Successfully. .

Matchmaking API

Match players randomly or by specific filters into games. Or create a list of open rooms and let players pick one.
It works. Simply and fast.

Customizable

With their turnkey API our client SDKs to guarantee low latency and shortest round-trip times for your multiplayer games worldwide.

You are in Good Company.

Join 86k+ Top Developers and Studios


Trustedly Hosting 90k+ Realtime Applications

Code Examples

Photon Unity Networking (PUN) re-implements and enhances the features of Unity’s built-in networking. Under the hood, it uses Photon’s features to communicate and match players. The API is very similar to Unity’s. Developers with prior networking experience in Unity will feel at home immediately. An automatic converter assists you porting existing multiplayer projects.

See PUN and Unity Networking compared in detail in the docs.

Connect


PhotonNetwork.ConnectUsingSettings("1.0");

Connecting our loadbalanced servers is as easy. You can use the passed in string to distinguish between versions or use it to group clients.

Join a Game


PhotonNetwork.JoinRandomRoom();

To join any existing game (often referred to as room as well) that is all it takes. Filters for max amount of players and game specific criteria are optionally passed in.

Create a Game


public void OnConnectedToMaster()
{
    PhotonNetwork.CreateRoom("Room42", true, true, 4);
}

Set up a new room using CreateRoom. Hand it over the room's name, the room's ability to be found by others, the option for others to join in and the max player count.

Start Multiplayer



PhotonNetwork
    .networkingPeer
    .OpRaiseEvent((byte)eventCode, (byte)interestGroup, (Hashtable)customEventContent, (bool)sendReliable)

Exchange in-game-data, set remote object properties e.a. sending them by RPC.

For further samples, a complete quickstart tutorial, demos and references see the online documentation for Photon PUN.