Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

RPC from client/server pair to another client/server pair...

Discussion in 'Multiplayer' started by Awesumo, Jul 24, 2014.

  1. Awesumo

    Awesumo

    Joined:
    Nov 6, 2011
    Posts:
    57
    We have a situation where we use a mobile device (client) running a unity scene to remote control a pc (server) running the same scene and we have the master server in the cloud. We pass remote control commands via RPC and all is peachy. Now we need to pass RPC from PC-to-PC while still being controlled by the mobile devices. Is it possible for a unity scene to have connections as both client and server, and essentially participate in two different RPC conversations simultaneously?
     
  2. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    Not at the moment, a server can only be a server.
     
  3. Awesumo

    Awesumo

    Joined:
    Nov 6, 2011
    Posts:
    57
    Just an update, despite apple's answer, I found that it does work to have an existing server connect to another server as a client. Actually, I was also able to call MasterServer.RegisterHost twice and essentially have the server become a second server with a different application id. So to answer my own question, it is possible to do remote controlling via RPC as client/server then simultaneously do gameplay RPC between two of the devices already talking to other devices through a different application id.
     
  4. appels

    appels

    Joined:
    Jun 25, 2010
    Posts:
    2,687
    Would you mind explaining how you achieved this?
    If this is possible I would really like to hear how. I still think this is impossible with the default Unity networking that exists at the moment.