I am trying to get a video (.ogv) from the Streaming Assets folder, apply it on to a surface and play it. (C# code added below) - Unity 5 Personal
void Start () {
private MovieTexture myMoviePlayerTexture;
string filePath = System.IO.Path.Combine(Application.streamingAssetsPath, "test.ogv");
WWW www = new WWW("file:///" + filePath);
Renderer r = GetComponent<Renderer>();
r.material.mainTexture = www.movie;
www.movie.Play();
}
C# Script added to a simple plane.
However when I add the MovieTexture to a plane (from assets folder) it plays without any problems.
((MovieTexture)GetComponent<Renderer>().material.mainTexture).Play();
edit: the Problem: the video does not play from the Streaming Assets folder, it appears as if a material is loaded but it does not play.
Any help appriciated. Thanks.
EDIT
This is the game view: link and this is the folder structure link nothing fancy just some test videos