Hi! I have a gui.button and another second over him to cancel the action.
The problem is if I use this code:
if(GUI.Button(Rect(30, 100, 70, 70), mainBut))
{
Debug.Log("MAIN BUTTON");
}
if(GUI.Button (Rect(160,100,20,20), cancel))
{
Debug.Log("CANCEL");
}
shows the cancel button but doesn’t work, and If I use this:
if(GUI.Button (Rect(160,100,20,20), cancel))
{
Debug.Log("CANCEL");
}
if(GUI.Button(Rect(30, 100, 70, 70), mainBut))
{
Debug.Log("MAIN BUTTON");
}
the cancel button works but dont shows like the image(second)
Some ideas to fix this?
Thanks in advance!