- Home /
Trouble with video
I'm trying to make a background video play when the player pauses the game, and I can't even get it to show up.
public var PlayVid : MovieTexture;
var isPlay;
function Start()
{
PlayVid.loop = false;
PlayVid.Stop();
isPlay = false;
}
function OnGUI()
{
if(isPlay == true){
PlayVid.loop = true;
PlayVid.Play();
}}
function Update()
{
if(Input.GetKeyDown(KeyCode.Escape)){
isPlay = true;
}if(Input.GetKeyDown(KeyCode.N)){
Start();
}}
Does anyone have an idea why this won't play? I am using Unity Pro.
Comment