Resolve WES-117 "Persistent data handling"
This commit is contained in:
@@ -7,11 +7,6 @@ using UnityEngine.UI;
|
||||
/// </summary>
|
||||
public class UserButton : MonoBehaviour
|
||||
{
|
||||
/// <summary>
|
||||
/// Reference to the user list, so we can extract the current user
|
||||
/// </summary>
|
||||
public UserList userList;
|
||||
|
||||
/// <summary>
|
||||
/// UI reference to the avatar object
|
||||
/// </summary>
|
||||
@@ -32,10 +27,10 @@ public class UserButton : MonoBehaviour
|
||||
/// </summary>
|
||||
void Start()
|
||||
{
|
||||
userList.Load();
|
||||
User user = userList.GetCurrentUser();
|
||||
avatar.sprite = user.avatar;
|
||||
username.text = user.username;
|
||||
PersistentDataController.GetInstance().Load();
|
||||
User user = UserList.GetCurrentUser();
|
||||
avatar.sprite = user.GetAvatar();
|
||||
username.text = user.GetUsername();
|
||||
dropdownBox.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user