Quantcast
Channel: Latest Questions by renezuidhof
Viewing all articles
Browse latest Browse all 28

AudioClip data is not being loaded after WWW.GetAudioClip

$
0
0
In Unity 4.x i was loading .wav files into AudioClips with the code below. Yesterday i updated to Unity 5 and now this is not working anymore. It will now just stay in the while-loop since the data is not loaded and thus cannot play the AudioClip. Am i doing something wrong or did something change? WWW AudioToLoadPath = new WWW("file://" + pathname); Track loadedAudio = Instantiate(TrackInstantiator) as Track; loadedAudio.GetAudioSource().clip = AudioToLoadPath.GetAudioClip(false); //A bit hackisch... But it's needed to load the audio while(!loadedAudio.GetAudioSource().isPlaying){ loadedAudio.GetAudioSource().Play(); } loadedAudio.GetAudioSource().Pause(); (Track is one of my own objects with an AudioSource)

Viewing all articles
Browse latest Browse all 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>