MovieTexture material color

Hi all,

I’ve got a timer that displays on a GUIText element that’s rendered by only one camera. In the field of that same camera is a plane on which I want to play a movie. So a script is attached to the plane that sets the renderer.material.mainTexture to the MovieTexture and plays it. The problem is that the movie is really birght and drowns out the GUIText (since it seems the only color available for GUIText is white, AFAIK). If I set the Instanced material’s color to (64, 64, 64, 1), it looks nice. When I try to set the material’s color in the script, it does nothing (see below). Any advice?

var movieTexture : MovieTexture;

function Start() {
	movieTexture.loop = true;
	renderer.material.mainTexture = movieTexture;
	renderer.material.color = Color(64, 64, 64, 0);
	movieTexture.Play ();
}


If you make a material for the GUIText, you can have it be whatever color you like.

Values in colors are floats, in the range 0…1.

–Eric

I had trouble with setting materials for my GUIText. Maybe it’s the font I’m using, but any shader I used caused the text to appear as blocks (see attached).

Ah, yes. Thanks. I was obviously attempting to use the ol’ 0-255 scale based on what I had set in the Inspector. I actually managed to work around it. I didn’t realize movie textures aren’t instanced, so I just set the movie texture in a material at 25% brightness and played it from the script rather than trying to attach it to the material from the script and then playing it.

97573--3786--$picture_2_185.png

Make sure you drag the actual font texture (generated from the font file) onto the texture slot for your material.

–Eric