- Home /
Runtime Audio Import
I am trying to find a way to import audioclips from files during runtime. I saw some people using WWW class for import, but it seems not straight forward to me. Is there another way to extract samples directly from say mp3, wav, ogg files?
I know I can import texture with Texture2D.LoadImage(), but I want to know if there is an equivalent method for audio.
Answer by aronze · Feb 15, 2016 at 04:09 PM
Are you want to load resources at runtime or to download from web link? If you want to just load at runtime, you have two methods.
First, use (AudioClip)Resource.Load( your audio clip name ).
In this case, your audio clip have to be placed in "resources" folder.
Second method is to use "Asset Bundle". If your audio clip is in placed asset bundle and then you already loaded them, try LoadAsset( asset name ) function.
I want my users to be able to load their own audio file in game. So I cannot use Resource.Load or asset bundle.
Your answer
Follow this Question
Related Questions
How to create a Script from another Script on runtime 1 Answer
Can I import a 3d Model in run time? 1 Answer
Manually Animating Bones then blending with existing animations or saving importing as fbx 3 Answers
How do I import audio and what type of audio do i need (mp3, etc.) 1 Answer
Problem loading .obj runtime 1 Answer