- Home /
Why guiTexture's mouse event doesn't work?
There are two guiTextures in my scene,the larger one is behind the smaller one, and I add a script to the "smaller",but the OnMouseOver() function doesn't work when the mouse over the "smaller",and when I move the larger one a bit far from "smaller",it works!! so How to fix the problem,Thanks..... here's two image to show my problem:
hey Suyuanhan,can u plz give me code for mousedown event on gui texture(i meant how could i detect gui texture images on mouse click)
Answer by AdamOwen · Jul 18, 2011 at 01:50 AM
That's probably because they are both at the same Z co-ordinate.
Select your large GUITexture, set it's Z position property to -1 in the inspector and your OnMouseOver function should now work on the small one.
Answer by vipin · Dec 29, 2011 at 09:28 AM
hey frns i have one problem with gui texture images which i have used as a button,currently the problem is that when i use mousedown event on gui textures,it fails to detect gui textures...plz help me if u can......
vipin
Answer by vipin · Dec 29, 2011 at 09:28 AM
hey can anyone plz give me code for mousedown event on gui texture(i meant how could i detect gui texture images on mouse click)