Skip to content

Commit

Permalink
Fixed music library exporting to player
Browse files Browse the repository at this point in the history
Exporting music library to player should now properly save the variables on the UdonBehaviour and also allow undo
  • Loading branch information
Varneon committed Apr 5, 2021
1 parent 8b55e90 commit 885a71f
Show file tree
Hide file tree
Showing 2 changed files with 1,984 additions and 1,982 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,13 @@ private void ApplyPlaylistsToPlayer()
}
}

player.SetProgramVariable("Urls", urls.ToArray());
player.SetProgramVariable("Titles", titles.ToArray());
player.SetProgramVariable("Artists", artists.ToArray());
player.SetProgramVariable("PlaylistIndices", playlistIndices.ToArray());
player.SetProgramVariable("PlaylistNames", playlistNames.ToArray());
Undo.RecordObject(player.GetComponent<UdonBehaviour>(), "Apply music library to player");

player.Urls = urls.ToArray();
player.Titles = titles.ToArray();
player.Artists = artists.ToArray();
player.PlaylistIndices = playlistIndices.ToArray();
player.PlaylistNames = playlistNames.ToArray();

player.ApplyProxyModifications();

Expand Down
Loading

0 comments on commit 885a71f

Please sign in to comment.