OnMouseUp and GUITexture

I have the following code attached to a GameObject with a GUITexture attached, however when I click on the button, the OnMouseUp function is not called. What’s wrong? As far as I can tell, the docs say this should be possible.

function Update () { //Keep button in same relative location

	var width = Screen.width/13;
	var height = Screen.height/9;
	guiTexture.pixelInset = Rect(Screen.width-width*2, Screen.height-height*4, width, height);

function OnMouseUp () {//Button clicked

	print("button clicked");

Try this: remove the Update function, do GameObject → Create Other → GUI Texture, then attach the script to that GUITexture. You can see that it does work. Since GUITextures use normalized viewport coords, I’d recommend just using those instead of calculating pixel insets. (And if you are going to do that anyway, there’s no need to do it in Update, since the screen resolution rarely if ever changes during gameplay.)