Believe me, I’ve done the research into this, but can’t seem to figure out what’s wrong with my code.
What I’m trying to accomplish is to have a slider and two small buttons on top of another button (which happens to partially overlap yet another button).
Ok, so I have one large button. It’s only purpose is to display text and light up when the player hovers over it.
On top of that, there is another button. This one serves the same purpose; display text and light up when the player hovers over it.
Inside of that button, I have a horizontal slider and two small buttons on either end of the slider.
The hovering over works just fine; everything lights up just as it’s supposed to.
When I click on the slider, however, I can’t slide it and the second glowing button goes dark (as though I’m no longer hovering over it). The first glowing button, on the other hand, stays lit. I imagine, the game assumes I’m clicking on that button, so no other functions are working.
I’ve tried doing the same effect using the GUI.depth with two different classes, but had the same result. It’s my understanding though that, if you don’t really want the back elements to do anything, you shouldn’t have to do this anyway. The GUI elements should work in the order that they were drawn, with the last element in the code being drawn on the top.
Visually, I can see that the slider is being drawn on top of the other elements, yet for some reason, it clicks the very back button every time.
Can anyone lend some advice on this?
Thanks.