Author Topic: UISlider  (Read 1536 times)

AlexeyTsoy

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 20
    • View Profile
UISlider
« on: October 13, 2015, 12:14:58 PM »
Hello! I have a question! Why do not you make it possible to change the slider value? now value is 0 or 1. But when i need to use the slider for health bar and i want to make hp 100 i have to value * 100! For example in new Unity UI slider it's possible!

Thx!
« Last Edit: October 13, 2015, 12:21:01 PM by AlexeyTsoy »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UISlider
« Reply #1 on: October 14, 2015, 08:33:02 AM »
Main reason? because it seems pointless to add an extra field to something that should be on the game code side anyway. It's not like it is particularly challenging to multiply the slider's value by whatever the top number you need it to be... and if you need min/max, can always do yourValue = Mathf.Lerp(min, max, slider.value);