Search Unity

Question on RPCMode.AllBuffered behavior

Discussion in 'Multiplayer' started by jeffcraighead, May 7, 2008.

  1. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    OK, I've got a GUI button that calls a NetworkLoadLevel RPC function on the game host with RPCMode.AllBuffered. This should send call the NetworkLoadLevel on the host, then on any clients that connect, correct?

    This seemed to work fine, however I finally got a chance to test this with more than 2 computers and it seems like the 2nd client is not getting the RPC call. NetworkLoadLevel increments the LevelPrefix, but from my understanding this only affects the allocation of ViewIDs, not RPC calls. Also, since it works on the first client, I don't see why the second client does not receive the RPC. Note that all 3 machines have public IPs.
     
  2. jeffcraighead

    jeffcraighead

    Joined:
    Nov 15, 2006
    Posts:
    740
    It turns out I was using AllBuffered correctly, but I had some other code that was causing the RPCs to be ignored, I moved a few lines around so that my SetLevelPrefix was called before Application.LoadLevel and removed a call to SetSendingEnabled = false on group 0 from OnConnectedToServer and everything works fine now. This I still find a bit odd since the load level is issued on Group 1 and it worked for 1 connection, but not subsequent connections. But in any case problem solved.