- Home /
UNet Connecting game over LAN
So I finished all of my Multiplayer stuff and I have the default Network Manager hosting my game. I just would like to host my game over a Local Network. Nothing fancy.
I researched, but I cannot find a guide on how to just host my game on the Local Network through 2 computers.
I tried editing the NetworkManager settings and having the NetworkManager host the game on my IP–"192.XXX.XXX.XX", but at runtime, the host game changes the network address to localhost no matter what I do.
How do I just host my game on a local network?
You can use local network discovery for local network game. This will give the ip address of the host and you easily connect by this ip from another computer by starting it's as a client.
Answer by Davedub · Aug 30, 2018 at 12:04 PM
I seem to be having this issue too - I set the Network Address to 192.168.X.X but at runtime it switches to localhost.
Did you ever find a solution?
@storybelldev - The problem is that regardless of how the network address is found or specified, Unity is overwriting it at runtime. I've made another post here, complete with a YouTube movie that demonstrates the problem: https://forum.unity.com/threads/unity-network-manager-overwrites-network-address-at-runtime.548731/