This is made in a way that makes sure that the repeated call for the function doesn't generate any new memory block other than the result from the HTMLWebRequest. Note that a network interface can have multiple IP addresses assigned, which is why I would instead check using your chosen network API. How you would check your own IP address in code should probably be done with whatever network API you are using, but here is a rather generic C# method to do so which probably works. But it has the advantage of also being useful over the Internet, for players who also know how to enable port forwarding on their router. You could look into how it works under the hood though, or if Mirror has it still and you're using Mirror well there you go, try that.ĭoing direct IP connections is a more reliable method, though requires some basic knowledge of the player hosting the game to find their own IP address. But I remember constant reliability complaints regarding network discovery. Mirror might have carried it over as well. If you meant finding each other on a local network, Unet had their Network Discovery feature. Click to expand.Finding each other is usually done through your own dedicated server, or through a cloud service (which is really just a dedicated server operated by someone else).