Hi,
I’m trying to load a movie from a file at runtime and it works ok in the unity editor but when I try it on windows nothing happens. I added some debug lines and it seems to get stuck at the debug line “not ready”. Would appreciate any suggestions.
var url;
if(Application.platform==RuntimePlatform.WindowsPlayer)
{
Debug.Log("file://" + Application.dataPath + "\\..\\Ads\\video.ogg");
url = "file://" + Application.dataPath + "..\\Ads\\video.ogg";
}
else
url = "file://" + Application.dataPath + "/Ads/video.ogg";
var www = new WWW(url);
while(![url]www.isDone[/url])
{
Debug.Log("loading");
yield;
}
if(!www) Debug.Log("no www");
else Debug.Log("www");
// Make sure the movie is ready to start before we start playing
movieTexture = [url]www.movie;[/url]
if(!movieTexture) Debug.Log("no movie");
while (!movieTexture.isReadyToPlay)
{
Debug.Log("not ready");
yield;
}