Initial import of Rhyculator
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
commit
728bb0c657
315 files changed
+96030
No files matched your search
@@ -0,0 +1,36 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user