From b53f5bbbb7ee9406ad63f5fd87309f79f404bb62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com>
Date: Thu, 31 Jul 2025 14:27:45 +0800
Subject: [PATCH] modify
---
Runtime/Utility/Utility.PlayerPrefs.cs | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/Runtime/Utility/Utility.PlayerPrefs.cs b/Runtime/Utility/Utility.PlayerPrefs.cs
index 5201136..56afa85 100644
--- a/Runtime/Utility/Utility.PlayerPrefs.cs
+++ b/Runtime/Utility/Utility.PlayerPrefs.cs
@@ -7,10 +7,24 @@ namespace AlicizaX
{
public static class PlayerPrefsX
{
+ private static string _prefix = string.Empty;
+
///
/// 当前用户前缀,用于隔离不同用户的配置项。
///
- public static string CurrentUserPrefix { get; set; }
+ public static string CurrentUserPrefix
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(_prefix))
+ {
+ _prefix = Application.productName.ToString();
+ }
+
+ return _prefix;
+ }
+ set => _prefix = value;
+ }
///
/// 组合完整键名,格式为"[前缀].[原始键名]"