Nearly each and every game is using health or progress indicator of some sort. Think about it. Experience, health, mana, charging, draining, loading, unloading things, speed, pressure, progress, and many many more. All of these may be easily visualized using Energy Bar Toolkit.
Energy Bar Toolkit is a tool to create elegant progress bars in just a few minutes without any additional scripting. Just drag and drop graphics into inspector and that’s all! Simplicity have really high priority here. You can script the bars to make more interesting effect using the simplest possible API! And now if you own PlayMaker, Energy Bar Toolkit supports it!
Please check out our demos (links below) to see what Energy Bar Toolkit can do for you!
So I bought this last night and placed my bars and it’s working pretty good but when I tested the same game on a different computer with a higher resolution screen, the bars were in the middle of the screen instead of the bottom left where they were positioned to be.
Hello! Thank you for your purchase I hope you like it!
All bars are absolutely positioned using pixel coordinates from top-left corner. I don’t know yet if the choice was right but I see now that when you would like to keep your bar close to bottom or right edge of the screen it would be tricky.
First of all you must decide if you’d like to scale the bar textures with screen resolution or not. I do not recommend scaling because it may cause flickering effect that is hard to avoid with gui elements. Without scaling solution is simple. Depending of which bar renderer you’re using attach to your bar script that look like this:
For EnergyBarRenderer:
void Start() {
int margin = 20;
var renderer = GetComponent<EnergyBarRenderer>();
renderer.screenPosition.y = Screen.height - renderer.size.y - margin;
}
for EnergyBarRepeatRenderer:
void Start() {
int margin = 20;
var renderer = GetComponent<EnergyBarRepeatRenderer>();
renderer.startPosition.y = Screen.height - renderer.iconSize.y - margin;
}
for EnergyBarSequenceRenrerer:
void Start() {
int margin = 20;
var renderer = GetComponent<EnergyBarSequenceRenderer>();
renderer.position.y = Screen.height - renderer.size.y - margin;
}
Thank you for your feedback! I see room for improvement here. I think I will make this simpler in next release: without need of scripting.
This saved me a chunk of time, easy to plug into my game and works great. The progress bars are a nice addition too
One request:
I have the same problem as RealFuzz with elements being off screen when I change resolution, obviously that’s not a bug as it’s how you’ve implemented it to work but if you could add an option for placement using the screen rectangle (which I guess updates as resolution changes happen) that would be useful
(I think I’m talking about Normalized values instead of pixels, still learning!)
Just yesterday I’ve commited new version of Energy Bar Toolkit for the review. It should be available in Asset Store in just a few days. With newest update you’ll get feature called pivots. By setting pivot point for your bar you can set it’s position to be relative to screen edges, corner or screen center. In the result bar located let’s say 10 pixels from right edge will remain so. You can read more about it here. Please follow this thread and you’ll be notified when new version will be available.
I like the idea about normalized coordinates. I’ll write it down in my TODO notebook. Thank you for your suggestion!