photonView.RPC methods

Options
Hi,

Where can i find the method names of the RPC function? can i sync stuff with that?

Comments

  • dreamora
    Options
    RPCs are defined through you in your code, there are none if you didn't add any
  • i do have a RPC method i use from the PUN plugin:
    photonView.RPC("SendChatMessage", target, chatInput);
    


    but how do i code my own, does anyone has a example to sync a public var?

    thanks :D
  • marf
    Options
    SendChatMessage is the name of your RPC method,

    if you find in the code there will be:

    [RPC]

    void SendChatMessage () for example, then you need to pass to the RPC the targets of it and (if there are) optinional parameters from your function.