Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question (Netcode) Hosting LAN server on mobile not working because of IP of form 10.x.x.x

Discussion in 'Multiplayer' started by thundermircea, Aug 2, 2023.

  1. thundermircea


    Dec 16, 2016
    My game uses Nnetcode and regular Unity Transport for LAN mode. Hosting on pc works, since the IP of the server is 192.168.x.x and I can join from my mobile builds.

    When trying to host on mobile, it creates a server on IP of form 10.x.x.x ; I can't join that server at all. Not from another mobile device, neither from PC.

    How can I fix this? How to force the mobile devices to use IP of form 192.168.x.x for hosting? If I just set the hosting IP to one starting with 192.168.x.x it fails to host, obviously, since it's not hosting on its own IP.

    Has anyone successfully used Unity's netcode for mobile LAN? how did you do it? For me only the PCs have the capacity of hosting LAN servers