Progress bar percentage not being updated in "get percent" function when bound

I have a progress bar
image

it’s bound to a function to set itself according to a “special” value.

The progress bar works and shows its progress correctly. 0.33 → bar 1/3 full
image

But trying to use the “get percent” function to get the bar’s current percentage only shows what the default value was set in the widget instead of the updated value.
image

I’m even using the same function to both; update the bar and get the bar value!

Why is it that the bar updates itself visually but only shows the default value when asked?

You don’t need this:

This works as intended

For the GetPercent I think you will have to use SetPercent to update it.

Edit:

Performancewise you should not use Bindings if you don’t have to. Just use SetPercent when you get a new SkillPoint

2 Likes

If you are feeding the return value directly to the progress bar then it only works in the range of 0 → 1.
You would need to set the min range to 0 and max to 1.

2 Likes

Thank you both of you! The “Set Percentage” method solved it for me :slight_smile:

Also, thank you for the performance tip :smiley:

2 Likes