Highlight UI Asset for Unity (Tutorials/Hints)
In tutorial levels for mobile games, often we want to make an element pop out. This will ensure the player learns about that element. Sometimes we even want to force the player to interact with that element. Highlight UI asset for Unity takes care of that!
I made the usage very simple for beginners. But I also allowed the more advanced Unity developers to be able to extend its functionality. In this article I’ll show you an overview of how the asset works. Need to highlight elements in your game? Read on!
Usage
The base API to show and dismiss the highlight UI are static methods on the ```HighlightUI``` class.
To highlight a UI element (any object with a RectTransform component), this line will do:
To highlight a 3D object (any object with a Collider or Renderer component), this line will do:
This line will dismiss the highlight UI:
Customization
There are options you can change either from Unity Inspector or from code to change different aspects of the highlight UI. You can change whether it can be dismissed by the user, its color, its fade animation, padding, and more.
The UI uses an overlay canvas to cover the rest of the screen and have the user focus on the element that is not covered. The canvas can be modified by your custom code. You can add text, image and other children to the canvas to further customize the highlight UI.
Final Note
Highlight UI for Unity is perfect for creating quality tutorial and hint UI specially for mobile games. It is easy to use, customizable and comes with demo scenes to get you started.