- Home /
Duplicate Question
http://answers.unity3d.com/questions/406895/load-external-mp3-file-without-streaming.html
Load MP3 file in code
Hello there. I would like to let user load mp3 file from one of their folders and then play it. I've tried many ways but couldn't do it. My code for that looks something like this:
WWW www = new WWW(fullPath);
AudioClip clip = www.GetAudioClip(false,true);
clip.name = fullPath;
Debug.LogError(clip.isReadyToPlay);
audioSource.clip = clip;
audioSource.Play();
I keep getting error that mp3 is not supported on this platform.
I'm guessing that, perhaps, mp3 is not supported on your target platform. What platform are you targeting? (I know Windows Phone doesn't support $$anonymous$$P3, pretty sure iOS/Android/PC do, don't know about the rest...)
Follow this Question
Related Questions
[Question] mp3player, my own music in unity game. 0 Answers
Playing mp3 files on Android 1 Answer
Audiosurf Visualization 2 Answers
Randomly mp3 sript, playing just first song 1 Answer
Streaming MP3s in WebGL Editor 0 Answers