Updating PUN

Options
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?

Comments

  • dreamora
    Options
    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)
  • amiractivate
    edited October 2012
    Options
    Ive downloaded both The PhotonUnityNetworking.package and Photon-Unity3D_v3-0-1-13_SDK.zip

    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?
  • dreamora
    Options
    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
  • 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?
  • dreamora
    Options
    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.