请教各位大大,之前我用过Unity查询相关网络讯息的介面像NetworkInterface.GetAllNetworkInterfaces()…
最近想转用creator来发展游戏项目。想问一下像以下的c# code在creator中要如何实现?
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface adapter in nics)
{
IPInterfaceProperties properties = adapter.GetIPProperties();
Debug.Log(adapter.Description);
Debug.Log(String.Empty.PadLeft(adapter.Description.Length, '='));
Debug.Log(" Interface type .......................... : " + adapter.NetworkInterfaceType);
Debug.Log(" Physical Address ........................ : " + adapter.GetPhysicalAddress().ToString());
Debug.Log(" Is receive only.......................... : " + adapter.IsReceiveOnly);
Debug.Log(" Multicast................................ : " + adapter.SupportsMulticast);
if (adapter.NetworkInterfaceType.ToString()=="Ethernet") {
tx_info.text += "Interface type ... : " + adapter.NetworkInterfaceType + "...";
tx_info.text += "Physical Address ...: " +adapter.GetPhysicalAddress().ToString() + "...";
tx_info.text += "receive only...: " +adapter.IsReceiveOnly + "...";
tx_info.text += "Mcast...: " +adapter.SupportsMulticast + "\n";
}
}