Loading Audio
Easy Save allows you to load MP3, Ogg, WAV, XM, IT, MOD and S3M files as Unity AudioClips, using the ES2.LoadAudio method.
Note that you cannot load MP3 files on Mac and PC, and you cannot load Ogg files on mobile devices.
To load an Ogg audio file into an AudioSource and then play it, you could use the following code:
1 2 |
audio.clip = ES2.LoadAudio("C:/User/Users/myAudio.ogg"); audio.Play(); |