The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Updating PUN

2012-09-10 16:51:06

This might be a silly question, but here goes: I've been using source code from an older version of PUN to do networking, and recently I've been coming across bugs that seem to be fixed by the latest version. However, I have no idea how to update the source code--when I went to the website I found an updated .dll but nothing resembling the source code I'm using (PhotonNetwork.cs, NetworkingPeer.cs, PhotonView.cs, etc.). A coworker suggested that I could find what I need in unity-realtime-demo, but the source code there is drastically different and doesn't contain PhotonView.cs, so I don't know if that's right. I've scoured the website, but haven't been able to find anything else that is useful. Does anyone know where I can find the updated code I'm looking for?


2012-09-11 09:00:18

PUN is updated through the Unity asset store, you can find it only there.

The downloads here on the page are for the normal SDKs which use the Photon Client SDK which is indeed quite different (its what PUN uses under the hood too though)

2012-10-01 08:52:20

Ive downloaded both The PhotonUnityNetworking.package and

As i understand it now the PhotonUnityNetworking.package should be used as a plugin, which is why the classes are public.

However looking at the sample projects in photonunity3d SDK, the classes are slighly different as in they are used via namespaces ( the classes are internal protected).

so im guessing the SDK and PUN isnt supposed to work together then? we should choose which one to work with ? is PUN simply an extra layer on top of SDK?

Can someone give me insights to how I should start writing my own custom code to work with photon?

2012-10-01 09:22:59

PUN is built upon the SDK and adds a 'nice known API' to interact with it. You can work with it as with the SDK but PUN is limited to the LoadBalancing / Photon Cloud server backends, while there are SDKs for Lite, LiteLobby and LoadBalancing/Cloud. The SDK is just the 'raw client - server networking' layer without the simplification and 'clothed like Unity Networking' aspect.

As PUN is a 'simplification of how to use Unity' and exclusive to unity, its offered on the Unity Asset Store as thats pretty surely the most convenient place for it to be.

So to come back to the problem: To update your version of PUN, click on Windows in Unity, Asset Store, and search for Photon Unity Networking and then click on Update which should be there instead of import / download

2012-10-01 09:31:57

Thanks for the fast reply,

I guess I should start writing by learning from the samples that came together from the SDK, and not use PUN if im going to use LiteLobby/MMO am I right?

2012-10-01 09:44:04

If you go with Lite/LiteLobby, you should use that SDK and its docs right, if you use MMO which is a seperate, distinct and incompatible thing, then you should start with that side. But going there I would recommend that you ensure that you have a halfway solid background on networking and other general coding concepts cause its the by far most complex path to go.

Back to top