deviceUniqueIdentifier
A unique device identifier. It's guaranteed to be unique for every device (Read Only).
Read time 2 minutesLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public static string deviceUniqueIdentifier { get; }
Remarks
iOS: Uses UIDevice.identifierForVendor to generate a unique device identifier.
macOS: Uses kIOPlatformUUIDKey to generate a unique device identifier.
Android: always returns the MD5 hash of ANDROID_ID.
SystemInfo.deviceUniqueIdentifierNote: Android 8.0 (API level 26) depends on the app signing key. The unsigned builds that are by default signed with a debug keystore typically have a different value than signed builds signed with a key provided in the Player settings. In addtion, when allowing Google Play to sign your app, this value will be different depending on whether the built app is built locally (signed with the upload key) or downloaded from the Google Play (signed with the final key).
ANDROID_IDLinux Standalone: Reads the unique device identifier value from:
- /etc/machine-id
- /var/lib/dbus/machine-id
If both files are present, the value from is used.
/var/lib/dbus/machine-idNote: Both files contain the same unique ID. Unity reads location as a fallback, if a linux distribution doesn't have dbus installed, that is, path isn't available.
/etc/machine-id/var/lib/dbus/machine-idWindows Store Apps: Uses for returning unique device identifier. If this option in PC Settings > Privacy > Let apps use my advertising ID for experiences across apps is disabled, Unity will fall back to . Note: Turning this setting off will reset your ID.
AdvertisingManager::AdvertisingIdHardwareIdentification::GetPackageSpecificToken().IdWindows Standalone: Returns a hash from the concatenation of strings taken from the following Computer System Hardware Classes:
- Win32_BaseBoard::SerialNumber
- Win32_BIOS::SerialNumber
- Win32_OperatingSystem::SerialNumber
Platforms that don't support this property, Unity will return SystemInfo.unsupportedIdentifier.