Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by hangemhigh · Apr 14, 2015 at 08:23 PM · slider

Unity 4.6 ui slider wont slide

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?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DiegoSLTS · Apr 14, 2015 at 08:40 PM 0
Share

It's really hard to help with this little info, share something more, describe your hierarchy and how are your components setup.

avatar image hangemhigh · Apr 14, 2015 at 09:29 PM 0
Share

For the GUI hierarchy, I have a gameobject called GUI. Inside the the GUI gameobject, I have canvas then a slider under the canvas. I really don't think that the hierarchy is the problem because I have moved or created new sliders outside of the parent game object I named GUI but that problem is still there.

9 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by hangemhigh · Apr 14, 2015 at 11:27 PM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image UrielKane · Dec 18, 2016 at 08:38 PM 0
Share

I tryed but it did not work the first time so i kept googling and find another cause of the problem. I was having the both so that's why i will respondo, so if anyone in the future have the same problem and read this can solve it.

Basicaly the canvas have to be the father of the slider and apart of making sure that nothing is blocking the slider, Also, we have to make sure that the canvas is set to Screen Space - Camera, other wise it dont work. I'm not sure why but after trying a whole morning the only way it work for me is with this set up.

avatar image
2

Answer by jacksonkmillsaps · Sep 19, 2015 at 03:30 AM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by MedzsikBoj · Sep 04, 2015 at 02:46 PM

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rhodnius · Sep 11, 2015 at 01:37 AM 1
Share

Also, if the Z position of the Slider is not the same as the canvas it wont work, in my case, i have the slider as child of a Panel, but the panel was not on the same Z position as the canvas, the slider didn't slide on any of the Slider Directions, so I just added it directly to the canvas, and tried it out and it worked, so i took that same Slider i added first to the canvas and made it child of the panel, and it worked just fine.

At the end to test my theory, i took the first slider that added directly into the panel, and took the Z position of the one i added first to the canvas, and the slider worked just fine.

Just in case some one else may have this same issue.

avatar image Steven-Walker · Aug 05, 2016 at 03:39 AM 0
Share

I just ran into this problem, but it turned out @jacksonkmillsaps is right. There was a Text item overlapping the slider. In your case the slider probably worked switching Right to Left, because the overlapping item isn't on the right side (it is exactly what happened for me). So anyone running into this issue, first check that there isn't some other object potentially in front of and blocking input. Once I moved the offending text object out of the way, my slider is working and it is not directly a child of a Canvas.

avatar image
1

Answer by JoeStrout · Jun 28, 2017 at 10:00 PM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image MultivariousDev01 · Dec 20, 2017 at 12:38 AM 0
Share

Thanks for this. This was my exact issue and I seriously thought I was going crazy, haha

avatar image
0

Answer by jamaster96 · Jan 28, 2016 at 01:29 PM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image jamaster96 · Jan 28, 2016 at 11:43 AM 0
Share

It did however work with the arrow keys.

  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

30 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I load post processing profile throught a script ? 0 Answers

Trying to move slider based off percentage of screen 1 Answer

UI Slider looses control in Update function 1 Answer

How to Assign FloatParameter 1 Answer

How to change label width of EditorGUILayout.Slider? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges