Hey guys!
I’m trying to do a slider countdown (5 seconds). I found this thread but I can’t seem to make the algorithm work.
The variable normalizedTime is updating as well as coundtownBarSlider.value. However, the graphics for the slider are not updating, the bar always starts as a random value and stays that way.
Might not be the problem, but definitely NEVER do things like line 4 above, going for the 6th child by number! That could change so easily and you would have no idea why stuff stops working.
Instead, when in Unity, act like Unity, and make a public field, drag the slider in:
If you’re spawning it, then no worries, just hold a reference to it when instantiating.
For the slider visuals, not sure why it’s not working…the range is set and Whole Numbers isn’t checked?
Can you move the slider manually when you play the game and confirm the values are changing in the Inspector? Comment out any script-based slider value changes.