Search Unity

NetworkMessageInfo.sender is equal to -1

Discussion in 'Multiplayer' started by MyCatFishSteve, Apr 16, 2014.

  1. MyCatFishSteve

    MyCatFishSteve

    Joined:
    Jan 13, 2013
    Posts:
    55
    When I send an RPC function through a script the NetworkMessageInfo.sender NetworkPlayer is equal to -1, this happens when the host sends a RPC function and he/she receives it... Solution and explanation anyone?
     
  2. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    I think that the server has a value of -1. Sending an RPC to itself is useless anyway. Execute the method by calling it, not through an RPC.
     
  3. MyCatFishSteve

    MyCatFishSteve

    Joined:
    Jan 13, 2013
    Posts:
    55
    yeah but im making a chat system