using UnityEngine; using UnityEngine.UI; public class ShowUID : MonoBehaviour { public Text displayText; void Start() { int uid = PlayerPrefs.GetInt("UID", 0); string type = PlayerPrefs.GetString("Type", ""); string uidHex; if (uid != 0 && !string.IsNullOrEmpty(type)) { char typeChar = type switch { "R" => '0', "A" => 'a', "B" => 'b', "D" => 'f', _ => '?' }; string uidHexPart = uid.ToString("X8"); uidHex = $"{typeChar}x{uidHexPart}"; } else { uidHex = "0x00000000"; } displayText.text = "UID: " + uidHex; } }