GUITextures and ClickEvent

Hey, I have GameObject which has GUITexture Component attached onto it. Now this gameobject have GUITexture child. I know how to detect MouseClick on a Parent but how to also detect MouseClick on its child because it looks like this:


or maybe if I can get around this somehow but with same effect?

I don’t understand how you’ve structured your script, but you can use HitTest() to make the check. So if you have a reference to the child GUITexture:

if (childGUITexture.HitTest(Screen.mousePosition)) {
     Debug.Log("Child was clicked");