This is the thread to put in all information, announcements and questions into one place. This first post will be updated as we go along. Feel free to follow or reach out to me on twitter at @mnerurkar.
What is Health and Progress Bar Pro?
If you want a good looking and useful ui bar, whether horizontal, vertical or circular, then you’ve come to the right place. The Progress Bar Pro asset contains a number of simple drag and drop prefabs that you just need to drop into your UI canvas. Updating them is as simple as calling a simple method. And if you don’t like the given bars, there’s lots of flexibility in the scripts to quickly create your own with existing components or to extend it with new functionality.
15 pre-designed progress bars and more to come…
Smooth bar animation
Preview of final value during animation
Change bar color based on fill value
Flash bar on value gain or loss
Dynamically placed text
INTERACTIVE DEMO Play around with the bars and see how they behave
The bar is currently on sale for it’s launch discount. As I add more features, functionality and prefabs, the price will increase accordingly. So grab it now!
Here’s a look at the different visual options:
And here’s an overview over how to create your own bars:
Known Issues
If the bar is set to animate but you’re updating it’s value every frame the interpolation methods inherent to the animation will lead to the bar not moving properly towards it’s new value. If you’re updating regularly, simply deactivate the animate flag. This is something I’ll look to solving in a future release.
Thanks! If you’ve got any questions, let me know. Same for feature requests or prefab bar ideas. Also if you’ve got time for a review, I’d greatly appreciate it!
Well it depends on what sort of values you expect, and how you want the behavor the behave when maxEXP are ignored. That is what’s slightly confusing me. So everything within if (!ignoreMaxExp) looks good - you’re updating with ints with a current and a max value.
But the other one doesn’t work. It’d either be “SetValue(exp)” but it then expects a value from 0-1 which doesn’t really work there. I’m presuming you don’t want to set a new maxExp value in that case? The solution would be to save the last maxExp value and use that in case of ignoreMaxExp. Sorta like:
int lastMaxExp;
public void RefreshExp(int exp, int maxExp, bool ingoreMaxExp)
{
if (!ingoreMaxExp)
{
ExpSlider.SetValue(exp, maxExp);
lastMaxExp = maxExp;
}
else {
ExpSlider.SetValue(exp, lastMaxExp);
}
}
This may or may not be the best solution to what you’re trying to do.
#1 I use the CircularSimple as my starting point. In the demo scene the handle is working fine. When i pick up the prefab the handle stop working. It just stays in the same place and i can’t figure out why.
//Edit: Ok, found that one. It has to be inside a Grid Layout Group
#2 I replaced the Text compoment with TextMeshPro object. It works fine but throws errors at me:
Hey HellPatrol, it doesn’t have to be in a layout group, but it’s parent needs to be of the proper size for it to work. You may also have to work with the offset slider. The handle uses the size of it’s parent to position itself. The CircularSimple root object is forced to be 256x256 by the GridLayout in the demo scene. It has to be that size even without the grid layout, then the BarHolder has the same size and the handle, that’s a child of the BarHolder can then position itself accordingly. And if BarHolder would end up being width 0, height 0, the Handle can’t animate.
Make sense?
And as for the second error: If you want to change the BarViewValueText from TEXT to TEXTMESHPRO, all you need to do is
It should, but as HellPatrol mentioned he’s been getting some issues.
As said above, what you need to do is go into the “BarViewValueText” component and change all “Text” to “TextMeshProUGUI”. Of course if you then use any of the prefabs they will be broken and you will have to restore them.
An alternative would be to add a new BarViewValueTextMeshPro and use that on your own bar designs, or replace that in the prefabs you’re using.
I’m guessing you’re asking if there’s any available? Currently not. It’d be pretty easy to use with the existing playmaker actions as you only need to call a specific function on the progress bar with the 0-1 float as a parameter.
Hi Martin, thanks for Progress Bar Pro. It’s great overall!
I do have a problem on Android. Sometimes (perhaps once every 5 or 10 times), the progress bar with glow will freeze right at the max glow. Then all Unity input will stop working, but the game continues running otherwise. Have you see this before?