Texture Changing

Hello beautiful forums and reader!

I am developing a game in which you shoot objects, and I would like to be able to make their textures/materials go down to display their health (roughly. I will have a bar at the top saying the health of the object) like the cubes in the Unity game Time Clickers (which is free on steam and is quite good). I was wondering how Proton Studios did that and I would like to be able to implement it in my game.

Thanks!

P.S. Please inform me if this is the wrong forum to be posting in i.e. Graphics, Scripting, Animation etc.

Try the learn section for tutorials on health bars and youtube is full of them -

Thanks for that, but I was looking for something like this when you shoot it:2249958--150331--time-clickers.jpg
If you could help me how to do that I would be very happy.

Thanks!

You could do this with a UI mask and a world canvas - https://unity3d.com/learn/tutorials/modules/beginner/ui/ui-mask
You could also do something similar using a texture(clamped) and adjust the y offset so it moves down or write a custom shader :wink: