Horje
unity mirror get ip address Code Example
unity mirror get ip address
public static class IPManager
{
    public static string GetLocalIPAddress()
    {
        var host = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName());
        foreach (var ip in host.AddressList)
        {
            if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
            {
                return ip.ToString();
            }
        }

        throw new System.Exception("No network adapters with an IPv4 address in the system!");
    }
}




Csharp

Related
Check object is in layermask unity Code Example Check object is in layermask unity Code Example
ontriggerenter Code Example ontriggerenter Code Example
how to find object by ag unity Code Example how to find object by ag unity Code Example
unity ray from mouse position Code Example unity ray from mouse position Code Example
enable script unity Code Example enable script unity Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10