You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 15:16:33 +09:00
Update PlatformConstrained.cs
This commit is contained in:
@@ -28,23 +28,21 @@ namespace Lidgren.Network
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static IPAddress GetMyAddress(out IPAddress mask)
|
public static IPAddress GetMyAddress(out IPAddress mask)
|
||||||
{
|
{
|
||||||
|
mask = null;
|
||||||
#if UNITY_ANDROID || UNITY_STANDALONE_OSX || UNITY_STANDLONE_WIN || UNITY_STANDLONE_LINUX || UNITY_IOS
|
#if UNITY_ANDROID || UNITY_STANDALONE_OSX || UNITY_STANDLONE_WIN || UNITY_STANDLONE_LINUX || UNITY_IOS
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!(UnityEngine.Application.internetReachability == UnityEngine.NetworkReachability.NotReachable))
|
if (!(UnityEngine.Application.internetReachability == UnityEngine.NetworkReachability.NotReachable))
|
||||||
{
|
{
|
||||||
mask = null;
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return IPAddress.Parse(UnityEngine.Network.player.externalIP);
|
return IPAddress.Parse(UnityEngine.Network.player.externalIP);
|
||||||
}
|
}
|
||||||
catch // Catch Access Denied errors
|
catch // Catch Access Denied errors
|
||||||
{
|
{
|
||||||
mask = null;
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
mask = null;
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user