Hosting and connecting MLAPI over LAN

Hello,

we are trying to make our game work (host and connect) over LAN. I am hosting on my computer and another participant in the same LAN is trying to connect. However, it is not working and we cannot figure out why.

Here are the Unity Settings for our UNetTransport in the NetworkManager:

The IP address matches my LAN IP address:
(the port is not being used by another application)

Both of our windows firewalls are turned off.

One thing that seems fishy, is that the logfile, when the application is started, shows another port being occupied than the one we entered in Unity:

We are clueless how to proceed at this point and appreciate any help.

Thank you very much! :slight_smile:

I might want to add that I can host and connect to my own PC when starting the application multiple times.

you check your windows firewall setting to make sure its not blocking the connection?

Thanks for your reply, but as I mentioned, our windows firewalls are completely disabled on both sides.

The logs you are seeing using the 54997 port are from the Unity debugger and profiler and not from MLAPI.

Have you tried pinging the other computer?

The logs were from the built game - but your hint was extremely helpful! I realized that we still had the ā€œdevelopment buildā€ checked. After unchecking it, we can now connect.

Thank you very much - would never have noticed that without your help! <3

Lovely community :slight_smile:

1 Like

It should probably be mentioned in the documentation though that ā€œdevelopment buildā€ is not working on network. It is not super obvious, considering you might want to debug over the network too, IMO.

(if it actually is in the docs, it is certainly not easy to find)

I have used development builds with MLAPI in the past without issues. So I think you have a special situation here which might not apply to everyone.