Animated UI Counter

$9
Publisher Damian Gonzalez
File size 719.03kB
Number of files 38
Latest version 1
Latest release date 2020-04-20 12:38:49
First release date 2020-04-21 01:18:11
Supported Unity versions 2018.4.2 or higher

Hi! Thank you for visiting this asset. At the bottom, you can download a demo build so you can test yourself 2 demo scenes.

WHAT IS THIS ASSET ABOUT?
Animated UI Counter gives you a simple-to-use but versatile UI counter, that you can use for keeping score, lives, coins, bullets, deaths... whatever you want to keep track of and show to players in the UI. As it's an UI element, it can be used for any kind of video games.

Animated UI Counter basically do 3 things:
- manages the UI counter (a number in the canvas)
- instantiates floating texts (like +1, -1, or custom text)
- camera shakes

In the documentation I'll cover everything in detail, here I'll summarize each of these functions.


UI COUNTER:
Basically, it's a number in the canvas that updates to reflect a variable, and it's animated: it flashes when it changes its value, suddenly changing its color and size, and then slowly going back to the original ones.
You can configure all this in the inspector: Normal color and size, what happens when the value increases (what color it flashes, how much the font size inscreases, the speed of the flash), what happens when value decreases...

And you can also configure a "special zone": For example a danger zone when player's go low on health, or has few bullets, so you can set a special color, size, speed, etc., independent from the normal ones.


FLOATING TEXTS:

If you want, this asset can instantiate an animated number or text on any position in the world, like "+1" when you pick a coin, or "-10" when an enemy loses 10 points of health.

You can just specify "where" and leave the text to the script, it will automatically write "+1" or "-1" according to the difference with the previous value. ...Or you can specify a custom text like "+20 HEALTH" or whatever you want.

You can set the colors when going up, a color for going down, how much and how fast the text goes up, how much and how fast the color goes transparent, how much it decreases the size.


CAMERA SHAKE:

You can configure camera shakes for different moments: For example: whenever the count goes down, or up, or when it goes below/above a number, and how big the shake is.

You can set as many of these rules as you want. For example (as shown in the video), a small shake every time values goes down (like every gun shot), and a big shake when goes up (like when you grab ammo).

And you can even set on which independent axes the camera will shake (X, Y, Z, or any combination of them). Camera shakes work with events, so you can ask for a camera shake from any scripts without references.

________________

A single counter gives you all that. You can have as many counters as you want. In the 2D demo there's one for time (seconds), other for coins, other for lives.



REQUIREMENTS
This asset requires Text Mesh Pro, but don't worry, it's a free asset from Unity Technologies, and it almost installs it self. More details in documentation.


HOW TO INSTALL AND USE
Installing this asset and using it is extremely easy. Just drag the prefab, reference it in your script and then tell it to update with the value. You can see the implmentation instructions.

Once installed, you can keep the count yourself in your own variable and just update the counter, like
counter.SetValue(myVariable);

or you can rely on the counter's own internal variables, like:
counter.AddValue(1);


EXTRA CONTENT

This asset includes a few scripts used in the demo, like:
- First Person Controller (used in 3D demo)
- Camera Follow (used in 2D demo)


Links
DEMO BUILD | DEMO VIDEO | ONLINE DOCUMENTATION | MORE FROM THIS PUBLISHER

Top Publisher Assets