The legacy networking system has been removed in Unity 2018.2. Use Unity Multiplayer and NetworkIden

Hi
With latest 2018.2 build have encountered an error. Google seems to suggest this is quite common but haven’t found a solution. The following line throws the error

Debug.Log("IPAddress" + Network.player.ipAddress);

Anyone know of a solution?

Just like it says the legacy Networking system is obsolete and removed from 2018.2.
Use the multiplayer system instead.

https://docs.unity3d.com/Manual/UNetOverview.html

Or use photon network, some prefer to use that instead

I’d absolutely recommend Photon over UNET, In my opinion UNET isn’t in a usable state at the moment (the HLAPI at least).

1 Like

I read today’s Unity blog post, with uNet getting deprecated I think that Photon will be the way to go for awhile (probably until 2020ish) when the new multiplayer is mature.

1 Like

Yeah that blog just came out

 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!");
    }
2 Likes

Is there a way to make UNET work with unity 2018.3 or anything newer?

1 Like