- Home /
Bloom effect around a GUI texture
Hi,
I have a health bar at the top of the screen that goes up and down depending on the health of the player.
GUI.DrawTexture(Rect(Screen.width / 2 - 150, Screen.height - Screen.height + 30, adjust, 15), playersHealthTexture);
adjust is a variable held in a GlobalVars.js
What I'd like to do is when health is added I'd like to add an effect like a bloom around the GUI area popping in then fading out, can someone point me in the right direction to achieve this please, cheers.
Answer by StormSabotage · Feb 01, 2014 at 05:57 PM
You should use custom texture with effect you want and place it on top of your health-bar, after it you can try to play with texture alpha transparency and with a way how you will show or hide it to make it work how you want. Aslo you can make it by particle, but it will be behind your gui.
Actually the best way is to use animated sprite for it but unity GUI can't do that, you can make your own cycle to switch textures to fade-in and fade-out your effect, or buy any asset which allows to build powerfull gui with any sprites you want (NGUI or T$$anonymous$$2D in asset store)
Thanks for the input, I'll look into it, I've already tried one fading in/out quickly but it doesn't have the desired effect .. I'll keep trying ..