Search Unity

TargetRpc vs NetworkConnection.Send

Discussion in 'Multiplayer' started by Deleted User, Jun 9, 2017.

  1. Deleted User

    Deleted User

    Guest

    Hi there, I'd like to ask.

    What is more reliable [TargetRpc(channel = 0)] via default Reliable Sequenced channel, or connection.Send(networkMessage)?

    Thanks.
     
  2. Zullar

    Zullar

    Joined:
    May 21, 2013
    Posts:
    651
    Connection.Send is more reliable. It always seems to work if client is connected.

    RPC's do not always work (even if reliable sequenced). They can fail to send if the client is not an NetworkIdentity.observer (which for me primarily happens around scene transition, but may happen for other reasons too).
     
    TwoTen and Deleted User like this.
  3. Deleted User

    Deleted User

    Guest

    thank you so much.