![]() If you wonder what's the UniversalEnum.WebHtml_isOnline goes to, it's the In comparison, a regular website ping is 56 bytes in size. ![]() If you use the same variable (exact same) multiple times, it's always better to set the variable and access it instead of generating a new one every time you need it. Things like particular color codes, animation Hash, directory paths, etc. In case some wonder, the UniversalEnum I use above is just a non-monohavior class script in which I set all my persistent and reusable static readonly variables for references. 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). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |