hi all, i want to play video in unity, and i found that using movie texture, and i can use it on standalone, but when i want to build on android device, i get some error just like here :
-
The type or namespace name `MovieTexture’ could not be found. Are you missing a using directive or an assembly reference?
-
Error building Player because scripts had compiler errors
this is my code:
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(AudioSource))]
[RequireComponent(typeof(AudioListener))]
public class Movie : MonoBehaviour {
public MovieTexture movie;
private float movieTimer;
void OnGUI(){
GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), movie);
movie.Play();
if(movie.duration < movieTimer){
movie.Stop();
print("Movie Finish");
}
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
movieTimer += Time.deltaTime;
}
}
anything wrong? or i have miss something so i can’t build movie texture on android?
please help me…
Thanks