Basic Syntax for guiTexture reference

I’d like to reference the GUITexture attached to my scene. I’ve noticed there’s a guiElement and guiText property to the Component and GameObject classes, but can’t figure out how to directly call the “guiTexture.” Could anyone put me to rights?

guiElement.color = Color.red;

Hmmm…

‘color’ is not a member of ‘UnityEngine.GUIElement’

?

This is probably not the best way, but I was finally able to reference the texture like this:

private var guiTexture;

guiTexture = GetComponent(GUITexture);

guiTexture.color = Color.red;

instead of guiElement.color try GUIElement.color

sounds like you just got lost in the case sensitve stuff. if GUITexture is a complete component, that would be your problem.