Okay, so, a question because I’m a bit stuck.
It’s really weird, I have a movie on a location that I want to play. This is just for testing purposes, so I’m using a static location of the video. And I’m using the following code;
using UnityEngine;
using System.Collections;
public class Main : MonoBehaviour {
private MovieTexture idlescreen_movie;
private bool movieloaded;
// Use this for initialization
void Start () {
StartCoroutine(GetIdlescreenFromLocation());
}
IEnumerator GetIdlescreenFromLocation() {
WWW idlescreen_location = new WWW("***/sonar_idlescreen_movie.ogv");
yield return idlescreen_location;
idlescreen_movie = idlescreen_location.movie;
movieloaded = true;
}
void OnGUI() {
if(movieloaded) {
GUI.DrawTexture(new Rect(0,0,Screen.width,Screen.height),idlescreen_movie);
idlescreen_movie.Play();
idlescreen_movie.loop = true;
}
}
}
Now, the problem is that I’m not getting the movie. The path is correct and I do not get an error or anything. But the movie is not playing either.
In the editor, I even get weird text in the left corner. In a build of this the screen just goes black.
Does anyone have an idea what could be wrong?