using TMPro;
using UnityEngine;
using UnityEngine.UI;
///
/// Handles actions when a user presses the account button (upper left corner)
///
public class UserButton : MonoBehaviour
{
///
/// Reference to the user list, so we can extract the current user
///
public UserList userList;
///
/// UI Reference to the avatar object
///
public Image avatar;
///
/// UI Reference to the username object
///
public TMP_Text username;
///
/// Start is called before the first frame update
///
void Start()
{
User user = userList.GetCurrentUser();
avatar.sprite = user.avatar;
username.text = user.username;
}
}