unity获取机器唯一标识符
作者:互联网
1.SystemInfo类
Debug.Log(SystemInfo.graphicsDeviceID);//获取显卡的唯一标识符
Debug.Log(SystemInfo.deviceUniqueIdentifier);//获取设备唯一标识符
Debug.Log(SystemInfo.deviceType);//获取设备的类型
Debug.Log(SystemInfo.processorType);//获取处理器的类型
2.PC
using System.Net.NetworkInformation;
private static string GetMacAddress()
{
string physicalAddress = "";
NetworkInterface[] nice = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface adaper in nice)
{
if (adaper.Description == "en0")
{
physicalAddress = adaper.GetPhysicalAddress().ToString();
break;
}
else
{
physicalAddress = adaper.GetPhysicalAddress().ToString();
if (physicalAddress != "")
{
break;
};
}
}
return physicalAddress;
}
标签:Log,SystemInfo,NetworkInterface,获取,unity,adaper,Debug,标识符,physicalAddress 来源: https://blog.csdn.net/qq_42972849/article/details/117108895