Is it posible to know the GUIElemnt (GUI.Button) under the mouse???
I have a GameObject with a script:
if (Input.GetButtonDown("Fire1")){
print("do stuf");
}
an other ‘unrelated’ GameObject(Camera.main) creates the button :
void OnGUI(){
if (GUI.Button (new Rect(20,40,80,20), "Button")){
print("BUTTTON PRESS");
}
}
the idea is to NOT have the first script fired when i press the button.
I could use the Texture Layer and create button old style … and then use the GUILayer.HitTest. but i realy would like to use the UnityGUI.