コード例 #1
0
    public void InitializeUI(PlaylistScript playlistScript)
    {
        this.playlistScript = playlistScript;

        if (playlistScript.gameObject.tag == "song")
        {
            artistNameProText.text += playlistScript.playlistName;
            songNameProText.text    = "";
        }
        else if (playlistScript.gameObject.tag == "artist")
        {
            artistNameProText.text += playlistScript.getPlaylistName();
            songNameProText.text    = "";
            // descriptionProText.text += ("Popularity: " + playlistScript.fullArtist.Popularity + "/n" + " Genre: " + playlistScript.fullArtist.Genres[0]);
        }
        else if (playlistScript.gameObject.tag == "playlist")
        {
            artistNameProText.text += playlistScript.getPlaylistName();
            songNameProText.text    = "";

            if (playlistScript.getSimplePlaylist() != null)
            {
                descriptionProText.text += ("Playlist Owner: " + playlistScript.getSimplePlaylist().Owner.DisplayName);
            }
        }
        else
        {
            Debug.LogError("Could not initialize Vinyl UI, tag not found");
        }
    }