Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 /
This question was closed Nov 19, 2016 at 09:08 PM by SgtShadowWalker.
avatar image
1
Question by SgtShadowWalker · Apr 12, 2015 at 09:38 PM · uicanvasslider

UI Sliders not interactable

Hi

I have a slider in my scene that it supposed to turn the volume up and down, but I can not interact with the slider at all. The interactable checkbox is ticked so it should work, but it doesn't.

Does anyone have an idea why this is happening and how I can fix it?

Comment
Add comment · Show 9
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 12, 2015 at 11:08 PM 1
Share

Do you have an EventSystem gameobject in your hierachy too? When you add UI stuff Unity automatically adds an EventSystem if there's non in the scene, but only when you do it in the editor. If you add a Slider at runtime the EventSystem won't me created.

Also, do you have anything else that could be over the slider? Note that an image with alpha 0 over your slider will also block the events.

avatar image SgtShadowWalker · Apr 13, 2015 at 06:38 AM 0
Share

There is an event system in the scene that I use for a few other UI elements and I'm 100% sure there's nothing blocking the slider.

avatar image KdRWaylander · Apr 13, 2015 at 06:58 AM 0
Share

Can we have a screenshot of your hierarchy around the slider (+ slider's inspector) ? $$anonymous$$ake sure there is no other UI panel/image/... over your slider, you can only interact with the top layer of your canvas (ie the last sibling in most of the cases)

avatar image SgtShadowWalker · Apr 13, 2015 at 08:36 AM 0
Share

Here's a screenshot. http://i.gyazo.com/73b8a981b605d070f7b73a58cf3dfa3b.png Nothing in the canvas is active at the moment except the slider. But not only sliders, toggle boxes and button don't work either when added.

avatar image apple92 · Apr 13, 2015 at 01:33 PM 0
Share

Sliders and Buttons can get Blocked by UI Elements that get Drawn in front.

If I look at your screenshot it seems like a text Element has found it's was in front of the Slider, rendering it unusable.

Reorder your Elements, so that the Slider is in front of the rest or try to avoid overlapping UI Elements that should be on a equal Layer.

UI Elements inside Canvas, Panel, etc. are order from bottom to top, the one at the bottom gets renderer in front of everything else, no matter what position you set in the Rect Transform.

Show more comments

3 Replies

  • Sort: 
avatar image
4

Answer by apple92 · Apr 13, 2015 at 02:43 PM

Well for everyone else having the same problem.

Check the following things:

  • Is any other UI Element blocking my slider/button?

  • Does any parent element have a canvas group with interactable false?

  • Are there any hidden (Alpha 0) Elements blocking my slider/button?

  • Is there an Event System in the Scene?

  • Does the button work in a newly created Canvas?

Working through this list while keeping in mind that, UI Elements inside Canvas, Panel, etc. are ordered from bottom to top (the one at the bottom gets renderer in front of everything else), should solve most of the problems.

Comment
Add comment · Show 3 · 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 starrtennis · Feb 03, 2019 at 02:50 AM 0
Share

Thank you. I did not know an Event System was needed.

avatar image irreversal95 · Mar 29 at 01:42 AM 0
Share

Had the same problem and the issue was that the UI element was too far in the negative on the Z axis. when I set it to 0 it started working again...

avatar image phillip71newman · Apr 08 at 08:50 AM 0
Share

Thank you for your advice! Your last point helped me. I moved my slider towards the bottom of the list inside the Canvas and it started working!

avatar image
2

Answer by the_lemur · Sep 13, 2016 at 07:34 PM

Had this problem. Had to change the Canvas to Screen Overlay instead of Camera space.

I don't know if it's because the original prefab was created in that space, or if it's universal. Not going to test just this moment.

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 williamqueen_vz · Nov 12, 2019 at 06:09 AM 0
Share

Changed $$anonymous$$e to overlay and it worked, this is ridiculous, sliders should work on any kind of canvas

avatar image
0

Answer by Max_Bol · Sep 21, 2016 at 06:43 PM

The most common reason why a slider or a button isn't intractable is because there's a overlapping UI element with "Raycast Target" activated over it. By default, that option is always activated for every new visible UI element added in the scene. (Only copied element with the option ticked Off aren't created with it On.)

For example, you might use a full screen 100% transparent UI image for you screen transition that allow you to turn the screen white, black or any color of your choice when switching screen. If that has the (as it is by default) "Raycast Target" activated, no UI element with either lower priority or behind it (varying the type of canvas) will be working from the mouse interaction (as it will block its raycast calls).

Sometimes, it can also be the type of font you're using. In an option menu for example, you might put thing in a dynamic way that allow it to adjust itself for such thing as different orientation (smartphone/tablets) and different screen ratios (PC/Consoles). At some point, maybe you got a text UI element that with "Raycast Target" on that is hovering above the slider, but as the font is slightly off to the bottom of its "space", you only will see it by looking at the Scene while selecting the Text element (with its box size).

If you're working on a flat canvas (anything else than "WorldSpace"), the Pos Z of your UI element might be off and something transparent might be over your slider.

Also, I would suggest, if you have overlapping menus option (like the option menu coming over a main menu) to switch the "interactable" value of all UI elements with such thing depending on the focused menu. (It requires some works, but it's working really well once well implemented.)

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 starrtennis · Feb 03, 2019 at 02:48 AM 0
Share

I set Raycast Target of the fader image off, and even deleted the fader canvas, set sorting order of the slider's canvas to 100, and set the slider's canvas layer to UI and all other element layers to below that, and it still doesn't work. "Interactable" is ticked and the slider appears interactable but clicks have no effect. It's even weirder because it is a prefab of a slider menu that works perfectly in another scene.

Follow this Question

Answers Answers and Comments

11 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

Related Questions

Call Functions On Player From Canvas Elements In a Multiplayer Game 1 Answer

Scrub control for a video player 1 Answer

In terms of performance, is changing the position of a whole canvas better than changing the position of a UI element? 1 Answer

How do i move the slider with GVR reticle pointer? 0 Answers

Script updates prefab but not instantiated clone of prefab 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