This page gives you instructions for integrating Jukebox with your own Unity game project. As such, it requires some Unity knowledge to do the plumbing needed to get Jukebox playing audio and connected to your game’s UI. If you would like to see a fully working demo first, before trying the instructions below, then go here to see instructions for testing Jukebox with the Unity Demo Package.

Once you’ve downloaded the Jukebox SDK, using the instructions here, you need to carry out the following steps to get the Jukebox Plug-in working in Unity:

  1. Copy the appropriate jukebox.dll assembly into your Unity game project as follows:
    • Create a directory in your Unity game project under the Assets directory, called ‘plugins‘, so that your projects directory structure contains the path: <your_project>/Assets/plugins/
    • Locate the plug-in DLL within the SDK from either unity/plugins/windows/jukebox.dll or unity/plugins/mac/jukebox.dll, depending upon whether you’re developing for windows or for mono-based platforms.
    • Copy the appropriate jukebox.dll under your newly created (or pre-existing) plugins directory.


  2. Import the plug-in wrapper scripts into your project as follows* (see below for alternative):
    • Using the Unity development environment menu select Assets->Import Package->Custom Package and locate the file unity/demo_code/minimal.unitypackage from the SDK bundle.
      • When prompted, ensure all scripts are selected and click ‘Import’.
      • This will have imported three scripts in your Unity project’s Assets/Scripts folder, which are as follows:
        • JukeboxPlaylist: this is a wrapper around the Jukebox Playlist interface, used for connecting the playlists you’ve defined on the Jukebox web-site to AudioSource objects within your game
        • JukeboxControl: this is a wrapper around the top-level Jukebox control, used for switching between playlists.
        • MusicControl: an example script (which may be discarded) illustrating how to switch between playlists in response to in-game triggers.


  3. Once you have reached this point you are ready to connect the Jukebox components into your game and start streaming Jukebox-sourced music. In order to do this read how to create Jukebox Playlists here, and then read the following section:

Next ->