UI slider with dynamic arrangement

Hello, i’ve made research but i didn’t find anything similar.

I want to create UI slider with different value arrangement.

Therefore, roughly said, i want to set 5% of value to be shown on first 20% slider, and other 95% of value to be shown on the remaining 95% of slider bar image, but with gradually transition if it’s possible.

I think this is very hard question, but please help if you have some idea. :confused: :slight_smile:

So, if I sum it up, you want :

  • 0 = 0
  • 20 = 5
  • 60 (((100-20)/2)+20) = 52.5 (((100-5)/2)+5)
  • 100 = 100

The best way I know to manage arbitrary value mapping is using AnimationCurves.

So, you can have a UI Slider go from 0 to 1 in a linear way, but have a script give you a value modified with an AnimationCurve, using AnimationCurve.Evaluate (value).