Saving on server

Hey i am using PUN and i want to save a XML file on THE server side not client thought i could write a plugin to PUN which i just placed with the Loadbalancing stuff it all worked out i dont think i got any errors BUT how do i tell the client to call that function on the server i tried using RPC but there is no RPC only for Server like RPCMode.Server that is the built in unity3d RPC

Comments

  • You want to know how to call an Operation on the server side? That would be the best way to implement something like that.
    Client side the NetworkingPeer inherits OpCustom(), which can be used for this.
    Server side, you would have to implement a new Operation. This is described here:
    http://doc.exitgames.com/en/onpremise/c ... operations


    Instantiates, RPCs and most other player-to-player activity in PUN is done via Events. They are client defined with some content that might change from version to version but in general, you could also modify OpRaiseEvent on the server side.
  • I dont understand this :( i read it all but it just did not make sense to me i am still new to networking i done alot of programming but i am self learned...
  • I guess the other answer is: You can't just save files on our Photon Cloud.
    Photon is not built to store files but for realtime communication.

    If you want to add this to Photon, you can do that by using the Photon Server SDK but you will have to host things yourself.
    You can either modify our Photon Server or you can use a http-based webservice to save (and load) your files. This can be done with the WWW class and some php and a DataBase.

    I'd say the easier solution is to keep Photon for doing what it does best: Realtime Communication. Use the WWW class of Unity for saving your files and profiles. Or check if there's another middleware that provides user-accounts and saving user data. Those services can be combined easily with Photon.