Mac Adress

Hi all,
I want to know if it’s possible to have the mac adress of a computer with a script.

Thanks for help :wink:

yes, through the System.Net.NetworkInformation namespace

this grabs all off them :

using UnityEngine;
using System.Collections;
using  System.Net.NetworkInformation;

public class MacTest : MonoBehaviour {

	// Use this for initialization
	void Start () {
		DisplayDnsConfiguration();
	}

	public static void DisplayDnsConfiguration()
	{
		NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces();
		foreach (NetworkInterface adapter in adapters)
		{
			IPInterfaceProperties properties = adapter.GetIPProperties();
			Debug.Log(adapter.GetPhysicalAddress().ToString());
		}
	}
}

Thanks for help !

But this script does’nt work, can you help me ?
I have created de new C Sharp Script named MacTest and paste your code.
I’ve assigned it to an empty game object but nothing happened in the console …

Via WMI? : http://www.microsoft.com/downloads/en/details.aspx?familyid=2CC30A64-EA15-4661-8DA4-55BBC145C30E&displaylang=en

JP