GUITexture

I just figured out I can mark my texture prefabs as type GUI and that leaves the dimensions as the original image instead of rescaling to fit powers of 4 or w/e it does normally. But now I can’t figure out how I can draw those on screen with OnGUI() like I can with normal textures.

So how can I draw GUITextures with OnGUI()? I’m using c#.

By coding you need to set GuiTexture(Pixel Inset) width, Height,x and Y. Do like this but need some attention to set this :-

public GUITexture xyz;
	// Use this for initialization
	void Start () {
		xyz.pixelInset = new Rect(Screen.width * 0.2f,Screen.width *0.1f,Screen.width *0.1f,Screen.width *0.1f);
	}