1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-17 07:36:32 +09:00

Unity Support. Just compile with __CONSTRAINED__ and UNITY keyworkds and add a reference to UnityEngine.dll

This commit is contained in:
Andrés Leone
2015-12-13 03:42:39 +01:00
parent 6dac4d7457
commit 208f129e3f
2 changed files with 14 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
#if __CONSTRAINED__ || UNITY_STANDALONE_LINUX
#if __CONSTRAINED__ || UNITY_STANDALONE_LINUX || UNITY
using System;
using System.Collections.Generic;
using System.Net;
@@ -29,9 +29,9 @@ namespace Lidgren.Network
public static IPAddress GetMyAddress(out IPAddress mask)
{
mask = null;
#if UNITY_ANDROID || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_IOS
try
{
#if UNITY_ANDROID || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_IOS || UNITY
if (!(UnityEngine.Application.internetReachability == UnityEngine.NetworkReachability.NotReachable))
{
return null;