Search Unity

Resolved Can't connect to server using UnityTransport instead of UNetTransport. No Port open.

Discussion in 'Netcode for GameObjects' started by Finn_O, Mar 12, 2022.

  1. Finn_O

    Finn_O

    Joined:
    Nov 18, 2020
    Posts:
    11
    After I switched out the UNetTransport with the prebuild UnityTransport for Netcode I couldn't connect to the server anymore. After testing if the Port was open it always showed that it was closed. The Firewall settings of the Linux server show it as open and used with UDP.

    Connecting locally on my PC works when I use 127.0.0.1 but when I use my external adress it stops working.

    (It worked previously using the UNetTransport)
    Could anybody point me in the right direction? Thx in advance.
     
  2. Finn_O

    Finn_O

    Joined:
    Nov 18, 2020
    Posts:
    11
    Solution: In oppose to UNet you need too set the IP in ConnectionData to your own public IP. Otherwise the transport will listen to 127.0.0.1:<Port>.
     
  3. unity_1929999

    unity_1929999

    Joined:
    Jul 20, 2020
    Posts:
    19
    Can you explain: public IP of remote server? But UNet also needs the same IP... What's the difference?
     
  4. Brian-Kryptomon

    Brian-Kryptomon

    Joined:
    Apr 17, 2022
    Posts:
    17
    For what its worth I've tried moving from UNetTransport to UnityTransport and it doesn't work either. I've updated my code to use ConnectionData and everything should work but I never can connect.