I'm working on an options menu for my game. For testing sake, (for my testers) I'm bringing in sliders to adjust things like player movement speed, jump speed, etc.
The problem I'm having is that when I have 2 sliders in the same script, only one of them reacts no matter which one I try to use. In this case, the "Player Speed" slider only works. When I click on the "Jump Height" slider, and try to drag it, it moves the "Player Speed" Slider Instead.
Any help would be appreciated, and I apologize for my recent uprising in questions. I've viewed, and reviewed the GUI Documentation resources and I'm still at a loss here. I'm finally making progress and I don't want to stop now!
Sorry for the mess that is this script. I'm trying to keep it as organized as I can, But trying to figure this scripting problem out is causing a little chaos.
Thanks again for any help.
asked Apr 25 '10 at 06:50 AM
You specified 150 as height for the slider. This makes the slider area so big, that it actually overlaps the area of the slider below. It seems that in this case Unity only processes the input for the element that was created first.
In short: adjust the height of the sliders to a sensible value (25 might work...). If you'd use GUILayout you would avoid this problem automagically. ;)
answered Apr 25 '10 at 01:04 PM