# How can I prevent the knob from resizing when I use the Slider?

I am using the Unity Slider component. I have a custom background and custom knob. But whenever I move the slider, my knob's size becomes distorted. It is 100x100 pixels, and when I set it to its native size, it does so. But I soon as I move the slider, it cuts its height in half. How can I prevent this from happening?

3 ways. 1) should work for all cases.

1) Parent the handle object to some empty and assign this object slider handle rect. Also, change the Anchor Preset to not stretched in Handle object. Thus slider will change Anchor Preset of GameObject, but Handle has no stretched, so it will not be changed.

2) There is a Preserve Aspect toggle in Image component, this may not work for you if you want your handle image to be another aspect.

3) Try scaling it in Scale, not changing its width or height.

• Is there a way to preserve the aspect ratio AND allow it to resize with the rest of the objects on the panel? As it is, when the window grows to 1080p, the rest of the images resize but the handles will not, making them very hard to see. – Dev Aug 12 '18 at 9:47
• @Dev there is a UI component that preserves the aspect ratio. – Candid Moon _Max_ Aug 12 '18 at 16:59