hi friends , for fetching mac address i read lot of forums and answers.i used that scripts i haven’t succeed.
static string GetMacAddress()
{
string macAddresses = “”;
foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
{
// Only consider Ethernet network interfaces, thereby ignoring any
// loopback devices etc.
if (nic.NetworkInterfaceType != NetworkInterfaceType.Ethernet) continue;
if (nic.OperationalStatus == OperationalStatus.Up)
{
macAddresses += nic.GetPhysicalAddress().ToString();
break;
}
}
return macAddresses;
// Debug.Log ("deviceToken "+macAddresses);
}
i added namespaces
using UnityEngine;
using System.Collections;
using System.Net;
using System.Net.NetworkInformation;
when i run i am getting this error.
ArgumentException: length