Unity Windows PC获得唯一标识符

    技术2022-07-12  72

    //可以通过mac地址唯一标识 private static string GetMacAddress() { string physicalAddress = ""; NetworkInterface[] nice = NetworkInterface.GetAllNetworkInterfaces(); foreach (NetworkInterface adaper in nice) { Debug.Log(adaper.Description); if (adaper.Description == "en0") { physicalAddress = adaper.GetPhysicalAddress().ToString(); break; } else { physicalAddress = adaper.GetPhysicalAddress().ToString(); if (physicalAddress != "") { break; }; } } return physicalAddress; }

     

     

     

    Processed: 0.022, SQL: 9