Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[WebRTC] How to connect to another instance by password?

Discussion in 'Editor & General Support' started by AytoMaximo, Apr 19, 2021.

  1. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    Hello!

    I’m feeling confused about Unity WebRTC examples, because they give no idea how to connect one physical PC1 to another physical PC2.

    All examples work on my local computer (it’s sender and receiver at the same time), but if I run the same scene on another PC, they won’t see each other.

    As I know, you can establish WebRTC connection by using the same password, but I can’t find such stuff in examples.

    Any help on the issue, please? I need a connection between 2 computers BY LOCAL network.

    P.S. Is there a specific Unity WebRTC forum thread or community anywhere?
     
    Last edited: Apr 19, 2021
    UnityLoverr likes this.
  2. UnityLoverr

    UnityLoverr

    Joined:
    Mar 29, 2021
    Posts:
    10
    i wonder the same
     
  3. UnityLoverr

    UnityLoverr

    Joined:
    Mar 29, 2021
    Posts:
    10
    So i just know, you need to do the signaling part somehow on your own. Watch in the PeerConnection Sample the Console.log's. At setting Remote description, for PC1 you need to set it "yourself" same for the remote Description of PC2. ( The remote decription is the sdp string(the offer) of the other PC. Thats what i get, i hope some1 else can confirm.
    <- really helpful
     
  4. UnityLoverr

    UnityLoverr

    Joined:
    Mar 29, 2021
    Posts:
    10
    You can even try the Unity Render Streaming Packages, there are samples for different PC's but it's harder to do something on your own at this package in my opinion ...
     
  5. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    UnityLoverr likes this.
  6. UnityLoverr

    UnityLoverr

    Joined:
    Mar 29, 2021
    Posts:
    10
    Is it any different to the Unity Render Streaming Package?
     
  7. AytoMaximo

    AytoMaximo

    Joined:
    Aug 26, 2015
    Posts:
    76
    Sry, I've never been interested in URSP. As I get it, it uses Nvidia features, but I need a solution for mobile platforms. Maybe I'm wrong in my conclusions.

    You can check that asset demos here: https://www.because-why-not.com/files/webrtcsamples/0.9850/
    Also the author has a lot of documentation on his website.