- Home /
Custom soundtracks?
Hello. Is there anyway to allow the player to use external audio tracks for an audio source, so that they can use their own music? I know there is a file browser on the wiki, could that help?
Answer by Fornoreason1000 · Sep 23, 2013 at 09:00 AM
I'm going to assume your making an offline game, and you want players to load custom tracks from their Hard drive;
System.IO will allow the user to setup a folder for the music, OGG files are recommended since unity has an encoder for them. You need to tell unity to load those files when the user wants them.
the easiest way for you would to have a folder in your build directory with the .ogg files in them. then you need to set up your game so that it will play those files based on the names of the files e.g Title.ogg will play at your title scene, Cursor.ogg will play when you click on something.
if making a web game, which you didn't specify... you only mentioned wikipedia. it won't be much different, but the file will need to be uploaded on a server or something. or you could try streaming it.
Answer by Justin Warner · Dec 22, 2010 at 09:09 PM
Maybe edit the HTML to autoplay a music file on your server, so then it plays anytime goes on your game page...
If not that, you can do music/audio in game.
Your answer
Follow this Question
Related Questions
Acessing Folders outside of Unity 1 Answer
Load a texture from an external file building it in Flash player 0 Answers
How to load objects from a file outside of unity3d 3 Answers
Is it possible to play midi files in unity? 2 Answers
Identical files in two locations needed to play music loaded at runtime? 3 Answers