Can't get sliced sprite working with the UI Slider.

For the life of me I cannot figure out how to make the sliced sprite work for this slider. I’ve tried both a small sliced version of the bar, and the full sized version of the bar.

If I choose the latter and pick a preserve aspect, then it looks right; but when the slider is dragged to the left, the entire image scales down. If it doesn’t preserve aspect, then the sides compress as well. Sliced SHOULD be the way to go… But this (the screenshot included) is what happens when I try.


This is what I want it to look like.


Any ideas…? Please and thank you. It would be very much appreciated.

EDIT: I solved this problem… well. Partially. Turns out that I had to use the handle scaling tool (thing) to bring it up to a bigger size, and then the scaling worked correctly as sliced. I then used the scaling tool to bring it uniformly back down to size and it worked fine.

But that left me with a new problem. (Hooray!)

Now when I adjust the slider, instead of scaling the bar, it simply moves it…?



EDIT 2:

Still not solved this… But for the meantime I put the fill under a duplicate of itself, but with an image mask on the parent, so whilst it is still technically moving instead of shrinking, it gives the same appearance.

I’m pretty sure you have to 9 slice the image and it looks like you’ve only got it sliced into 3 (left, center, right)
Basically you want it so the 4 corners are their own slices and so don’t stretch but the top/bottom middle, and the left/right middle sections are what stretch.

1 Like