24 lines
568 B
C#
24 lines
568 B
C#
![]() |
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);
|
|||
|
PlayerPrefs.Save();
|
|||
|
}
|
|||
|
|
|||
|
// <20><>ȡ<EFBFBD>ϴε<CFB4>¼<EFBFBD><C2BC><EFBFBD>˺<EFBFBD><CBBA><EFBFBD>
|
|||
|
public static string GetLastLoggedAccount()
|
|||
|
{
|
|||
|
return PlayerPrefs.GetString(AccountKey, null); // Ĭ<><C4AC>ֵΪ null<6C><6C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD><CBBA><EFBFBD>
|
|||
|
}
|
|||
|
}
|