function YoutubePlay(){
// Start download
var youtoobMuvee = new WWW(youtubeString);
// Make sure the movie is ready to start before we start playing
var movieTexture = youtoobMuvee.movie;
while (!movieTexture.isReadyToPlay)
yield;
funkBox.renderer.material.mainTexture=movieTexture;
audio.clip = movieTexture.audioClip;
// Play both movie & sound
funkBox.renderer.material.mainTexture.Play();
audio.Play();
}
Getting a youtube vid , applying it as a texture to a gameobject and playing it with sound doesnt work , i am getting these errors
!texture.texture
UnityEngine.MovieTexture:get_isReadyToPlay()
UnityEngine.MovieTexture:get_isReadyToPlay()
failed to create 2D texture
UnityEngine.MovieTexture:get_isReadyToPlay()
UnityEngine.MovieTexture:get_isReadyToPlay()
what am i doing wrong here?