public void UpdateDataFromPlaylist() { _packName = _playlist.playlistTitle; _coverImage = _playlist.icon; _packID = $"Playlist_{playlist.playlistTitle}_{playlist.playlistAuthor}"; // _isPackAlwaysOwned = false; PlaylistsCollection.MatchSongsForPlaylist(playlist); //bananabread playlist CustomPreviewBeatmapLevel[] levels = playlist.songs.Where(x => x.level != null).Select(x => x.level).ToArray(); SongCoreCustomLevelCollection levelCollection = new SongCoreCustomLevelCollection(levels); _customBeatmapLevelCollection = levelCollection; }
public void UpdateDataFromPlaylist() { _packName = _playlist.playlistTitle; _coverImage = _playlist.icon; _packID = $"Playlist_{playlist.playlistTitle}_{playlist.playlistAuthor}"; _isPackAlwaysOwned = false; PlaylistsCollection.MatchSongsForPlaylist(playlist); IPreviewBeatmapLevel[] levels = playlist.songs.Where(x => x.level != null).Select(x => x.level).ToArray(); CustomLevelCollectionSO levelCollection = ScriptableObject.CreateInstance <CustomLevelCollectionSO>(); levelCollection.SetPrivateField("_levelList", levels.Where(x => x is BeatmapLevelSO).Cast <BeatmapLevelSO>().ToList()); levelCollection.SetPrivateField("_beatmapLevels", levels); _beatmapLevelCollection = levelCollection; }