Used the script below to playback some videos but I keep on getting error CS0246: The type or namespace name ‘MovieTexture’ could not be found. Are you missing a using directive or an assembly reference?
It works fine when playing in the scene but will not compile for Android.
Not much of a coder. What am I doing wrong?
Please advise. Any help or advice would be greatly appreciated.
using UnityEngine;
using System.Collections;
[RequireComponent (typeof (AudioSource))]
public class VIDEO : MonoBehaviour {
public MovieTexture movie;
// Use this for initialization
void Start ()
{
renderer.material.mainTexture = movie as MovieTexture;
audio.clip = movie.audioClip;
movie.Play ();
audio.Play ();
}
}