Healthbar/UI Slider glow effect
Hi, I'm trying to get a UI slider to have a sort of glow effect when the slider's value is at it's maximum. I currently have a setup where I changed the Canvas to Screen Space - Camera and then positioning a glowing particle effect on top of the UI. This particle effect's gameobject is by default turned off and will be turned on when the slider bar is full. I was wondering if anyone knew of a cleaner or better/alternative method for getting effects/animations on a UI slider.
Answer by KdRWaylander · Jan 06, 2016 at 09:07 AM
Hi,
Best solution i see is to use a shader for the glowing effect, it will be less heavy for your hardware and it doesn't need you to set your canvas to world space :)
You need to add a material that has a custom shader to your image. The custom shader will take care of the glowing part. Here's a tuto: https://www.youtube.com/watch?v=WU_M9fLnd_Y
Then, change the shader at runtime: http://docs.unity3d.com/ScriptReference/Material-shader.html
Hope it helps you (haven't watched the tuto) !
Your answer
Follow this Question
Related Questions
"Clipping", "Jumping" UI slider, attached to the 2d game object ( health bar) 0 Answers
Slider Component Problem (Health Bar) 1 Answer
"Clipping", "Jumping" UI slider, attached to the 2d game object ( health bar) 0 Answers
Bloom effect on UI 0 Answers
Change Value Of UI Light Slider to Read At Specific Points Of Slider Value 1 Answer