Use SystemInfo.deviceUniqueIdentifier
it is built in to unity. One thing to check however is it can return the value of SystemInfo.unsupportedIdentifier
if it is running on a platform that does not provide a way to get a unique id.
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
void Start () {
if (SystemInfo.unsupportedIdentifier != SystemInfo.deviceUniqueIdentifier)
{
// use SystemInfo.deviceUniqueIdentifier
}
}
}
Be sure you are running Unity 4.6.2 or newer as there was a bug for it on linux not returning consistent values but it was fixed in 4.6.2.