I am using Unity 4.6.4p2. The problem I have now is that the new UI slider wont slid with mouse. It only slides when the keyboard left or right arrow keys are pressed. It selects/higlight when I click on it but the mouse cannot slider it. My project is huge and I don’t know why it is NOT sliding. I have tried deleting and creating new slider but that didn’t work either.
I created a new empty project with a new slider and the slider works. The new empty project slider worked with mouse but the one in my project isn’t working. The project is almost complete and is in GUI phase and I can’t start everything over again just because of a slider problem.
Any suggestions?
The problem is because I put the canvas of the slider in a an empty gameobject. If I remove the gameobject and use the canvas as the parent object, it works. So basically the parent object of the slider should be canvas or else it wont work. This should be fixed.
I had a slider-not-sliding problem. It turned out that the slider was overlapped by a UI.Text that was its sibling. Even though the actual text was not overlapping the slider, the box that contained the text was. Moving the text solved the problem.
I ran into this today (in Unity 5.6.2!) and spent quite a bit of time tracking it down. For posterity, in my case the problem was that the camera’s near clipping plane was 100, and our Screen Space - Camera canvas’s plane distance was also 100. This apparently put the UI right at the edge of the clipping plane, where it mostly worked… except for slider dragging.
Changing the canvas’s plane distance to 101 (or any value larger than the main camera’s near clipping plane) fixed it.
I had this happen and, after reading some responses here it got me trying various solutions. Namely, I just moved the panel containing my sliders down the hierarchy to make sure it was in front and that solved the problem.
I know this is an older thread, but I had the same issue and found something interesting
What you said is correct, if the parent of the slider is not Canvas it won’t work.
But let me actually correct you on one thing, that is it won’t work only if the Slider Direction is set to Left To Right.
If you set it to Right to Left it will work correctly even if the parent is not a Canvas.
None of the above worked for me. The slider responds to clicking but not sliding, even if it is on its own in the canvas. The problem was to do with the connection between the event system and canvas.
If the canvas is a child of another gameobject, the Rect Transform changes and the slider cannot be dragged. However when the canvas has no parent, it drives the rect transform values on it’s own and recognises slider dragging.
I haven’t found a work-around to this apart from having every canvas parent-less.
You’re right, when the slider is into a gameobject, it doesn’t work with the mouse
As stated by @jacksonkmillsaps, the culprit may be another overlapping UI element, such as a Text object, the invisible bounds for which can be larger than you might expect. A simple solution is to uncheck Raycast Target in the Text inspector. This will make the text invisible to UI interactions, so it won’t matter if it overlaps or not.
I know this is an old Thread, but none of this worked for me.
In the end it turned out that i had deleted my events system, after adding a new canvas, it created a new event system and then all of a sudden it started to work.