protected override void OnConnectedChanged(ConnectedChanged e) { base.OnConnectedChanged(e); if (e.IsConnected && !string.IsNullOrEmpty(TargetId)) { m_isFollowingId = TargetIdType == AccountType.Artist ? SpotifyService.IsUserFollowingArtist(TargetId) : SpotifyService.IsUserFollowingUser(TargetId); // Gets information about the target id AccountInfo details = TargetIdType == AccountType.Artist ? (AccountInfo)SpotifyService.GetArtistDetails(TargetId) : SpotifyService.GetUserDetails(TargetId); if (details != null) { StartCoroutine(Spotify4Unity.Helpers.Utility.LoadImageFromUrl(details.ProfilePictureURL, Spotify4Unity.Enums.Resolution.x128, (sprite) => { m_userImg.sprite = sprite; })); if (m_name != null) { m_name.text = details.Name; } if (m_followers != null) { m_followers.text = "Followers: " + details.Followers.ToString(); } } m_followBtn.GetComponentInChildren <Text>().text = m_isFollowingId ? "Unfollow" : "Follow"; } }