Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  3. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Disallow children of Slider Handle from initiating Drag

Discussion in 'Unity UI & TextMesh Pro' started by ChaiKnight, Dec 6, 2018 at 11:21 AM.

  1. ChaiKnight

    ChaiKnight

    Joined:
    Apr 11, 2013
    Posts:
    1
    I have a Slider with its Handle outside the Slider area. Above and below this Handle I have a two Buttons that increase and decrease the Slider value. These Buttons are children of the Handle object so they follow it up and down.

    When I press the buttons, everything is fine, but they also initiate dragging the Handle which they should not. I could remove their child status, just making them children of the Slider, and add a script to each of them to follow the Handle up and down, but I would prefer a more elegant solution.

    Any ideas?

    Here's a picture of my scenario: example.PNG