Ignore AIClient/Library and AIClient/HybridCLRData permanently; include HybridCLR/YooAsset project setup and UI tooling. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
523 B
C#
23 lines
523 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace HotUpdate.Net
|
|
{
|
|
public static class DeviceId
|
|
{
|
|
const string PrefKey = "aigame.device_id";
|
|
|
|
public static string GetOrCreate()
|
|
{
|
|
var id = PlayerPrefs.GetString(PrefKey, string.Empty);
|
|
if (!string.IsNullOrEmpty(id))
|
|
return id;
|
|
|
|
id = $"ed_{Guid.NewGuid():N}".Substring(0, 18);
|
|
PlayerPrefs.SetString(PrefKey, id);
|
|
PlayerPrefs.Save();
|
|
return id;
|
|
}
|
|
}
|
|
}
|