Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
3
Question by ina · Sep 11, 2015 at 01:58 AM · uiguitouchslider

UI Slider - making the touch area for slide larger than the UI image handle

How do you make the slider more friendly for touch-devices by making the handle area larger than the handle?

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 itsharshdeep · Sep 11, 2015 at 05:12 AM 0
Share

Hi

I think you can use png image which have more alpha at outer side of the required image so that it may increase your touch area, but visually that seems same.

avatar image youblistermypaint · Apr 14, 2016 at 11:14 PM 0
Share

See also http://answers.unity3d.com/questions/188270/ios-increase-slider-thumb-touch-area.html

2 Replies

· Add your reply
  • Sort: 
avatar image
12

Answer by killroy · Mar 02, 2018 at 12:44 PM

Add a child image element Area to Background, set alpha to 0 and enlarge the rect transform params. The slider should now react when clicked inside Area boundaries.alt text


slider.png (41.0 kB)
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
4

Answer by lEscargotl · Oct 06, 2016 at 09:17 PM

@ina Try this:

Increase the "Handle Slide Area" to whatever area you want to be touchable.

Then, add a UI Mask to the "Handle" and uncheck "Show Mask Graphic". Feel free to remove the attached image ("Knob") but not the image component and rename the GameObject "Mask".

Next, attach an empty child game object to "Mask" that will serve as the "Handle" visible to users. Set its Rect Transform to Stretch, make "Left" & "Right" 0 and "Top" & "Bottom" the inverse of the changes made to the "Handle Slide Area", attach a UI Image component, and change its source image to whatever you want to use for a knob.

This solution worked great for me when I tried it for my app!

The attached image shows one of the sliders with the mask image revealed and one with the mask image hidden to give you a better idea of how this solution works:

alt text


screen-shot-2016-10-06-at-13543-pm.png (258.7 kB)
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

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

34 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 avatar image avatar image avatar image avatar image

Related Questions

Vertical Slider - Using different art? 1 Answer

Mobile controls, gui mouse problem. 0 Answers

How would I implement a GUI texture that acts as a slider? 0 Answers

Move Slider-value to middle value when released 1 Answer

How do you get Old OnGUI Scripts to work with the New UI Scrollbars? 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