Adding outlines to text
In this recipe, you will learn how to add an outline to a Text (Script) component. In order to achieve this, you will have to learn how to use a UI Effect component of the new UI system of Unity, the Outline (Script) component. Similar to text shadows, text outlines can also add an element of boldness to text that is displayed on the screen. This can be useful when there are many elements on the screen, or even if you just want a certain text element to appear more dominant than others. There are many uses for text outlines, and they can be useful to experiment with in order to find out what suits your game the most.
How to do it...
- First of all, we need to create a new UI text. In order to do this, right-click on the Hierarchy ...
Get Unity UI Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.