if! why you no work?

it doesn’t print “about to drag” when the if conditions are met…? some stupid mistake somewhere i can’t see?
i can see toolTip being set to “Drag” in the inspector if i hover over the blue pill box…
this is all in a function that gets called in OnGUI.

for (var Bnr:int in bluePills)
{
GUILayout.Box(GUIContent (“blue pill”, “Drag”));
GUI.Label (Rect (mousePos.x-160,mousePos.y-130,100,40), GUI.tooltip);
toolTip=GUI.tooltip;
if(Input.GetMouseButtonDown(0) toolTip==“Drag”)
{
print(“about to drag”);
}
}

Input only works in Update. You have to use Event (.mousePosition, etc) for OnGUI.

oh is it didn’t know, thought it would also work in OnGUI since it also runs every frame… thx