private void Awake() { if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); Info = info; currentUser = null; }
public static void LogOut() { currentUser = null; }
public static void LogIn(string username, int score) { currentUser = ScriptableObject.CreateInstance <UserInfoSO>(); currentUser.username = username; currentUser.score = score; }