- Home /
Error CS0246 only in compiling and not in Scene Playback?
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 ();
}
}
Answer by robertbu · Aug 13, 2014 at 01:05 AM
The MovieTeture class does not exist for mobile. You have to use Handheld.PlayFullScreenMovie() or you can go to a third-party plugin like the ones sold by Prime31.
Thx for the answer. $$anonymous$$akes sense now. Isn't this one of the new features of 5.0 btw?
Your answer
Follow this Question
Related Questions
How do I Play/Pause video which is a child of vuforia image target? 0 Answers
what are accepted video extensions ? 1 Answer
How to paly Video in the Scene 1 Answer
Changing texture when movie is paused 0 Answers
Pause the video in unity after playing it but it will done automatically after some time of period. 0 Answers