Wugga wugga,
Good morning, all.
Well, making steady progress on the GUI. Everyone has been a great help in getting this done. Basically I am trying to implement all kinds of functionality through GUI buttons in my scene. Already accomplished so much and its really coming together. My next step is to try and play a movie texture on a game object using the GUI button.
I have
var movie : MovieClip
function OnGUI () {
GUI.backgroundColor = Color.blue;
GUI.Box (Rect (10,280,150,400), "Menu");
GUI.color = Color.white;
if (GUI.Button (Rect (20,320,130,20), "Play That Movie")) {
renderer.material.mainTexture = movie;
movie.Play();
}
}
This is obviously not going to work because I’m sure my code doesn’t know where the renderer should be renderer…ing…er… rendering. So I need to know how to tell the function to:
Hey, there’s a game object with a movie texture on it. When I press “Play That Movie” button, I want you to play the texture on that object.
So any ideas on how to handle that will be greatly appreciated. By the way, when this is finally done the script will be posted in its entirety for all to enjoy. Mostly for beginners like me to use and learn from.
Thanks a ton,
-Richard