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.

Question Issue with connecting to server over LAN network

Discussion in 'Multiplayer' started by Gary1q2, Oct 30, 2020.

  1. Gary1q2

    Gary1q2

    Joined:
    Apr 29, 2020
    Posts:
    2
    Hi, I'm creating a unity multiplayer game and I am having trouble connecting to a server on a computer from another computer on the same LAN. I've searched far and wide for an answer but can't seem to find a solution that works.

    If I create a dedicated server and client on the same computer I can connect fine to the server, but when I try to connect to a host from a different computer it just fails to find the server.


    Example setup:
    Computer A running a dedicated server + a client: Client connects to server using local IPv4
    Computer B running a single client: Client attempts to connect to server using the local IPv4 address of computer A (I used ipconfig to find its ip, which is something like for example 192.168.124.1)

    Things I have tried:
    -Tried allowing the application through firewall on both computers
    -Tried disabling firewall on both computers
    -Running as admin on both computers

    Maybe I need to port forward? But port forwarding is only if somebody wants to connect over the internet right?

    Kind of lost what else should I do? Any help is appreciated, thank you! :)

    Edit: Wtf I was at uni and decided to switch to my mobile hotspot and it suddenly worked on two computers!!!! hmmmm maybe it is something to do with the networks :O, but still not working on my home network at home
     
    Last edited: Oct 30, 2020
  2. Gary1q2

    Gary1q2

    Joined:
    Apr 29, 2020
    Posts:
    2
    UPDATE: I got it working, I would like to believe that it was because of my firewall, I had allowed the unity application to SPECIFICALLY be allowed but it still didn't work at the time because I was at uni, using my campus wifi.

    I came home and it started working. holy moly yayy
     
    Joe-Censored likes this.