Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

SystemInfo.deviceUniqueIdentifier

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static var deviceUniqueIdentifier: string;
public static string deviceUniqueIdentifier;

Description

A unique device identifier. It is guaranteed to be unique for every device (Read Only).

iOS: on pre-iOS7 devices it will return hash of MAC address. On iOS7 devices it will be UIDevice identifierForVendor or, if that fails for any reason, ASIdentifierManager advertisingIdentifier.

Windows Store Apps: uses AdvertisingManager::AdvertisingId for returning unique device identifier, if option in 'PC Settings -> Privacy -> Let apps use my advertising ID for experiences across apps (turning this off will reset your ID)' is disabled, Unity will fallback to HardwareIdentification::GetPackageSpecificToken().Id.

Windows Standalone: returns a hash from the concatenation of strings taken from Computer System Hardware Classes (https://msdn.microsoft.com/en-us/library/windows/desktop/aa389273(v=vs.85).aspx):
Win32_BaseBoard::SerialNumber
Win32_BIOS::SerialNumber
Win32_Processor::UniqueId
Win32_DiskDrive::SerialNumber
Win32_OperatingSystem::SerialNumber

Will return SystemInfo.unsupportedIdentifier on platforms which don't support this property.

Did you find this page useful? Please give it a rating: