diff --git a/Lidgren.Network/Encryption/NetAESEncryption.cs b/Lidgren.Network/Encryption/NetAESEncryption.cs index 9e099d1..2938414 100644 --- a/Lidgren.Network/Encryption/NetAESEncryption.cs +++ b/Lidgren.Network/Encryption/NetAESEncryption.cs @@ -19,7 +19,7 @@ namespace Lidgren.Network static NetAESEncryption() { -#if !IOS && !__ANDROID__ +#if !IOS && !__ANDROID__ && !UNITY_4_5 AesCryptoServiceProvider aes = new AesCryptoServiceProvider(); List temp = new List(); foreach (KeySizes keysize in aes.LegalKeySizes) @@ -103,7 +103,7 @@ namespace Lidgren.Network /// public bool Encrypt(NetOutgoingMessage msg) { -#if !IOS && !__ANDROID__ +#if !IOS && !__ANDROID__ && !UNITY_4_5 try { // nested usings are fun! @@ -138,7 +138,7 @@ namespace Lidgren.Network /// public bool Decrypt(NetIncomingMessage msg) { -#if !IOS && !__ANDROID__ +#if !IOS && !__ANDROID__ && !UNITY_4_5 try { // nested usings are fun! diff --git a/Lidgren.Network/NetPeer.Internal.cs b/Lidgren.Network/NetPeer.Internal.cs index 217dbdb..a176d85 100644 --- a/Lidgren.Network/NetPeer.Internal.cs +++ b/Lidgren.Network/NetPeer.Internal.cs @@ -1,4 +1,4 @@ -#if !__ANDROID__ && !IOS +#if !__ANDROID__ && !IOS && !UNITY_WEBPLAYER #define IS_MAC_AVAILABLE #endif diff --git a/Lidgren.Network/NetPeerConfiguration.cs b/Lidgren.Network/NetPeerConfiguration.cs index 79ec112..2165724 100644 --- a/Lidgren.Network/NetPeerConfiguration.cs +++ b/Lidgren.Network/NetPeerConfiguration.cs @@ -35,6 +35,10 @@ namespace Lidgren.Network // -4 bytes to be on the safe side and align to 8-byte boundary // Total 1408 bytes // Note that lidgren headers (5 bytes) are not included here; since it's part of the "mtu payload" + + /// + /// Default MTU value in bytes + /// public const int kDefaultMTU = 1408; private const string c_isLockedMessage = "You may not modify the NetPeerConfiguration after it has been used to initialize a NetPeer"; diff --git a/Lidgren.Network/NetUtility.cs b/Lidgren.Network/NetUtility.cs index 0059701..645fdb7 100644 --- a/Lidgren.Network/NetUtility.cs +++ b/Lidgren.Network/NetUtility.cs @@ -16,13 +16,17 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRA TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if !__ANDROID__ && !IOS +#if !__ANDROID__ && !IOS && !UNITY_WEBPLAYER #define IS_FULL_NET_AVAILABLE #endif using System; using System.Net; + +#if IS_FULL_NET_AVAILABLE using System.Net.NetworkInformation; +#endif + using System.Net.Sockets; using System.Text; using System.Text.RegularExpressions;