Now that GetAudioClip is obsolete in 5.6, how can I play music in my game from an external URL?
…but no examples of how to use it in script (C#)
I’m guessing this is some sort of WWW thing, but documentation is pretty much non-existent for 5.6
And please don’t say “Asset Bundles”, I’ve just killed 48 hours working on that
I discovered this thread while looking for a way to stream audio from the web into a Unity app - I’m not sure if you’re still working on this?
As I understand it, the WWW classes are deprecated. Any new code should be written using the UnityWebRequest API. Here are the docs for downloading an Audio Clip Networking.UnityWebRequest.GetAudioClip.
However I have yet to discover how to stream (rather than just download) an audio clip.
Hope that helps!
I had the same question and I answered it here, the key is the progress at .01 (1%), time to wait until it starts streaming adjust it to .1 or higher for better results.
I have used below plugins for streaming audios on iOS and Android and they work out of the box. Developer is also very helpful. Provided support when ever was required.
Android : Audio Stream in Android | Integration | Unity Asset Store
iOS : Audio Stream in iOS | Audio | Unity Asset Store