2025-01-02 16:27:21 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class AccountManager : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
private const string AccountKey = "LastLoggedAccount";
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD><CBBA><EFBFBD>
|
|
|
|
|
public static void SaveLastLoggedAccount(string accountName)
|
|
|
|
|
{
|
|
|
|
|
PlayerPrefs.SetString(AccountKey, accountName);
|
2025-01-02 16:55:57 +08:00
|
|
|
|
//PlayerPrefs.Save();
|
2025-01-02 16:27:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// <20><>ȡ<EFBFBD>ϴε<CFB4>¼<EFBFBD><C2BC><EFBFBD>˺<EFBFBD><CBBA><EFBFBD>
|
|
|
|
|
public static string GetLastLoggedAccount()
|
|
|
|
|
{
|
2025-01-02 16:55:57 +08:00
|
|
|
|
return PlayerPrefs.GetString(AccountKey,string.Empty);
|
2025-01-02 16:27:21 +08:00
|
|
|
|
}
|
|
|
|
|
}
|