Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

RPC calls

Discussion in 'Multiplayer' started by llavigne, Mar 12, 2008.

  1. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    if an RPC call is done from one script to another script, do I need a networkviewer on both end ?
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    You need the network view in the script where the RPC is implemented. And you need to call the RPC on that network view, e.g.

    Code (csharp):
    1.  
    2.   myOtherCoolScript.networkView.RPC(...)
    3.  
    Sunny regards,
    Jashan
     
  3. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    thanks
     
  4. llavigne

    llavigne

    Joined:
    Dec 27, 2007
    Posts:
    977
    I read in the doc that the networkview just need to be attached to the gameobject.
    so with 3 different scripts attached to a go, all with rpcs, all you need is one networkview and this works but doesn't seem to function with buffer which appear to be very broken... or applied in an order non specific - larus, what's the order of buffer call for a new connected player ? before or after the scripts start on the remote machine ?