Can you use a key press to change the Video playing on a Plane
I have a Plane with a movie texture which loops and then on different key presses I need various other videos to play on the same Plane, continuously switching from one to another with each key press. After searching the Answers I can't see if this can be done and I am very new to scripting. So my question is can I do this by getting the MovieTexture to play a variable changed by the key press and if so what scripting can I use? Thankyou.
My simple code so far is:
using UnityEngine; using System.Collections;
[RequireComponent (typeof (AudioSource))]
public class Video : MonoBehaviour {
public MovieTexture movie;
// Use this for initialization
void Start ()
{
((MovieTexture)GetComponent<Renderer> ().material.mainTexture).Play ();
movie.loop = true;
}
// Update is called once per frame
void Update () {
}
}
Your answer
Follow this Question
Related Questions
Texture Over MovieTexture? 0 Answers
How to split animated texture or video? (Example provided) 0 Answers
iOS full-screen movie audio not playing, codec maybe? 0 Answers
EasyMovieTexture Memory & CPU Usage 1 Answer
Issues with video player coroutine 2 Answers