Search Unity

Third Party Photon PUN - Are RPCs sent instantly?

Discussion in 'Multiplayer' started by iddqd, Jan 24, 2015.

  1. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hey

    I'm wondering if RPC Calls in Photon PUN are sent as soon as i call the RPC or are they dependent on the PhotonNetwork.sendRate?

    So if the sendRate is 100ms (default), the RPC could be delayed up to 100ms until it gets sent.

    Many thanks.
     
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    13.11.4.24 int PhotonNetwork.sendRate [static], [get], [set]
    Defines how many times per second PhotonNetwork should send a package. If you change this, do not forget to also change ’sendRateOnSerialize’.
    Less packages are less overhead but more delay. Setting the sendRate to 50 will create up to 50 packages per second (which is a lot!). Keep your target platform in mind: mobile networks are slower and less reliable.

    13.11.4.25 int PhotonNetwork.sendRateOnSerialize [static], [get], [set]
    Defines how many times per second OnPhotonSerialize should be called on PhotonViews.
    Choose this value in relation to ’sendRate’. OnPhotonSerialize will creart the commands to be put into packages. A lower rate takes up less performance but will cause more lag.
     
  3. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hey BRGames, thanks for the answer.
    So is there another way to send a message instantly in PUN?
     
  4. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    tobiass likes this.
  5. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Ok, thanks a lot for the info!