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; + } /// /// 组合完整键名,格式为"[前缀].[原始键名]"