Love heart
GamePrefabs? Click the button: 

Home > Products > UPMusic (smart music bank)

UPMusic (smart music bank)

Preview demo


Compatible with: Unity 2.6, Unity 3.x, Unity iPhone/iPad 1.7, Unity 2.6 and 3.0, Unity3 Android, Unity3 iOS, Unity3 Pro, Unity3, Unity 2.6 Pro

UP Music is a professional music prefab that allows you to easily fade between different types of audio tracks with one line of code from any other script!

Including in the package is the required scripts, documentation, and an easy to use custom editor to setup your tracks.


As a bonus, I have also included a test script that will allow you to test the fades between tracks. This script pulls the tracks automatically from the editor, allowing you to easily test your added tracks. To see and hear and example of this prefab, click the preview button below.

Note: The audio tracks used in the preview scene are not included in this Prefab, but audio packages can be purchased on this site.


Click here to download the UPMusic documentation before you buy! (PDF)

Added on January 7, 2011 in


Indie license 35
Commercial license 75

Please login to buy this product.

What license should I pick?


log in to comment



I am not sure the problem is in UPMusic, UPMessenger, Unity, Xcode or me. I just can't play music when deployed to the real device (iPhone4) - in Unity all is OK. Here's the Xcode log message:

Any idea what I could do with the issue?

Thanks, Vaclav

on January 15, 2011


@Vancura - It looks like the issue may be the UPMessenger script. Try re-downloading the UPMessenger script here and replace the one in the project with the new one.

on January 15, 2011


@Cheapdevotion: Still the same, but I guess it's UPMessenger's problem. I'll move my woes there. Thanks!

on January 15, 2011


@Vancura - If it helps at all, I know for a fact that the C# version of UPMessenger works on the iPhone/iPad. Just make sure to put the file in the "Plugins" or "Standard Assets" directory so it can be called from the UnityScript files.

on January 15, 2011


@Cheapdevotion: Yeah, I found the problem, it was in JS-C# communication, sort of. I wrote about it in the UPMessenger thread:

Thanks anyway!

on January 16, 2011


@Vancura: Just for people that read this thread, let me post the solution you added on the UPMessenger thread also:

I just solved the issue. The problem was in combination of UPMusic in JS and UPMessenger in C#. When I moved UPMessenger in /Plugins folder (to be compiled before JS), everything was fine again. Actually it's interesting the issue applied to Xcode compilation only.

on January 21, 2011


When i try to use your UPMusic script i get this error on line 85 of the UPMusic.js script:

UnassignedReferenceException: The variable currentSource of 'UPMusic' has not been assigned.
You probably need to assign the currentSource variable of the UPMusic script in the inspector.
UPMusic+$FadeEffectIn$15+$.MoveNext () (at Assets/UPMusic/UPMusic.js:85)
$:MoveNext() (at Assets/UPMusic/UPMusic.js:60)
UnityEngine.GameObject:SendMessage(String, Object)
UPMessenger:Broadcast(String, Object) (at Assets/Plugins/UPMessenger/UPMessenger.cs:102)
NewBehaviourScript:Start() (at Assets/NewBehaviourScript.cs:11)

I am using the C# version of the UPMessenger plugin, and i have placed it in the Plugin folder.

on January 22, 2011


@Mattivc - it sounds like you are trying to access the "currentSource" variable before it is assigned. This usually happens before music is playing or after it stops. Contact me via direct message so I can take a look at your code (pasted to, if possible), and we will go from there. Also send me the version of Unity you are using, as well as your OS.

on January 22, 2011