I’ve placed a movie as the Texture for the GUI Texture; however, I’m having a bugger of a time activating it. I want it to play when I run over an object.
The code I’m using is:
var moviegui:GameObject;
function OnTriggerEnter (GraphicsGuy : Collider) {
PlayMovieFunction();
}
function PlayMovieFunction(){
moviegui.renderer.material.mainTexture.Play();
}
I’m just not sure how to call it up in the function so it burrows down to the movie Texture. Please help.