Creating A UI Flash Effect In Unity

A simple effect, but it can make some situations and elements really catch the player’s attention, and imply urgency and importance.

First, the variables:

Next, the timing:

Now to start the coroutine:

Then, if we head back to the Unity editor, we can add the required components:

Add a CanvasGroup component onto whatever UI object you want to flicker
Add the script we wrote above onto another GameObject (or the same one), specify the flicker speed, and reference the CanvasGroup

That’s it!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Vincent Taylor

Vincent Taylor

Unity game developer / C# Programmer / Gamer. Australian (Tasmanian) indie games developer for 10+ years. Currently looking for games industry employment.