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

Resolved Relay Host & Client works on local environment but not on different devices

Discussion in 'Relay' started by insoluzioni, Jul 25, 2022.

Thread Status:
Not open for further replies.
  1. insoluzioni

    insoluzioni

    Joined:
    Nov 25, 2018
    Posts:
    6
    I managed to successfully connect two instances of a game, exchanging data from server to client and client to server (using RPC). It works perfectly in this scenario:

    - Using ParrelSync to clone a new instance (same machine);
    - Running both games on editor player;
    - Authentication is anonymous, but a profile is assigned to the playerId (so I that can simulate 2 different users);
    - Note: I must authenticate first the instance that is going to play as joining client, and second the instance that is going to be the host. If I don't follow this sequence, eg. start the host first, I'll get the message "join code not found". I'm assuming this is some error in my code while authenticating users.

    I doesn't work, although, when I test it on another device:

    - Using an android device, connected to the same WiFi or using mobile networks;
    - Development Build, installed via apk (not Google Play);

    Any hints of what may cause this or any limitations I am not aware of?

    Thanks!!
     
  2. insoluzioni

    insoluzioni

    Joined:
    Nov 25, 2018
    Posts:
    6
    Recon03 and emilyryan like this.
  3. emilyryan

    emilyryan

    Unity Technologies

    Joined:
    Nov 22, 2019
    Posts:
    129
    Thank you for posting your findings! We're going to close out this forum post. I hope you have a great day!
     
Thread Status:
Not open for further replies.