Search Unity

Photon SERVER RPC

Discussion in 'Scripting' started by FabrizioSpadaro, Feb 2, 2013.

  1. FabrizioSpadaro

    FabrizioSpadaro

    Joined:
    Jul 10, 2012
    Posts:
    287
    Hi guys i have a problem i use only photon server and i wont to share some stuff like variable value between 2 client.
    I can correctly connect to the server and make room and connect but i wont know how can i schare variable start function etc.
    In unity network i used to use the RPC but in photon server don't exist how can i do??
     
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Using Photon cloud or server? With the cloud service you can still use RPCs [RPC] above methods. With photon server you work with operations and responses, which works differently.

    This is the simple explanation.
     
  3. FabrizioSpadaro

    FabrizioSpadaro

    Joined:
    Jul 10, 2012
    Posts:
    287
    in the title you can see SERVER xD BY THE way 2 answer:
    HOW WORK THE OPERATION AND RESPONSE SYSTEM??
    I have set up my server with room etc with the photon server sdk , can i dowload photon cloud and swich to dedicate server???
     
  4. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    1. Stop writing in caps, it is annoying.
    2. Have you looked at their homepage? They actually explain it there.
     
  5. FabrizioSpadaro

    FabrizioSpadaro

    Joined:
    Jul 10, 2012
    Posts:
    287
    yes but the docu of photon server is very bad... so if you know and can help me is better
     
  6. FabrizioSpadaro

    FabrizioSpadaro

    Joined:
    Jul 10, 2012
    Posts:
    287
    i use c# and the photon server v3
     
  7. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    If you do not understand their example i cannot help you. Maybe you should start with something easier.
     
  8. softmarshmallow

    softmarshmallow

    Joined:
    Jan 29, 2016
    Posts:
    7
    found how?
    any solutions?
     
  9. SkaredCreations

    SkaredCreations

    Joined:
    Sep 29, 2010
    Posts:
    296
    Photon Cloud (and so I think Photon Server as well) has RPC calls too, exactly the same way you use in unity networking, you only need to add the attribute [PunRPC] to your function and of course the object must have PhotonView attached. You can also use a method void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info) to send variables over time.
     
  10. Kamil-Says

    Kamil-Says

    Joined:
    Jun 30, 2014
    Posts:
    154
    PUN = RPC,EventCalls,OnPhotonSerializeView, Photon Server = CustomOperations
     
  11. softmarshmallow

    softmarshmallow

    Joined:
    Jan 29, 2016
    Posts:
    7
    so.... what should be my server code??
    what server method gets rpc called from client??