- Home /
Is it possible to access a Unity audio asset from iOS?
I did a search on the Forums and Answers and could not find anything on it, but...
Say I have a bunch of .wav files somewhere in the Unity project's assets folder that get loaded into AudioClips and played. Is there a way to get the file location/path for these .wav audio files in Obj-C when building a Unity iOS plugin?
Answer by GameVortex · Jan 21, 2015 at 08:04 AM
Before Building the project: Sure. Just use the path to the project and path to the audio files in the Unity project.
After building: Simple answer: No. Because the audio files are not a single file in a specific location anymore after you build the project. They are compressed into all the data files.
Real Answer: You can if you move all your audio files into a folder named StreamingAssets in the Unity project. They will then not be compressed into the data files, but instead remain as a raw folder with the files in it. Which you can then access normally.
Thanks, I was not aware of Strea$$anonymous$$gAssets. I'll look into that.
Your answer
Follow this Question
Related Questions
How do I move the Asset Folder to another drive? 0 Answers
Unity 5.6 iOS GVR audio spatializer incompatible? 0 Answers
iOS "Mute other audio sources" disabled but not working 2 Answers
Read audio/music currently playing on speakers? 0 Answers
Location service initializing forever on iOS devices without GPS. 0 Answers