GuiTexture error?

Hi, I’m trying to align a GuiTexture to the bottom center of the screen for my Android game :slight_smile: This is my code:

	public Vector2 TextureSize = new Vector2(100, 400);
	public GUITexture FireButton;
	void OnGUI()
  		GUITexture ( new Rect( Screen.width - TextureSize.x, Screen.height - TextureSize.y, TextureSize.x, TextureSize.y ), FireButton );

I’m not sure if I’m missing a “new” or if I’m mixing GUITextures with 2Dtextures?

This is the error: Expression denotes a type', where a variable’, value' or method group’ was expected

Thanks, Andreas

You might want to use GUI.DrawTexture(…) with a normal texture image instead.

I’ve never used it, but I believe GUITexture is a Component that draws the specified texture automatically when attached to a GameObject: