We have set up a system to switch atlases at runtime depending on the screen's size. We can also use reference fonts to make sure we can easily switch multiple labels' fonts in one click.
We will now create a fourth font, which will be a reference font, pointing to another one. We'll use it to change the font used for all labels very easily:
In the Project view, go to the
Assets/Resources/Fonts
folder.Select the SmallLato font prefab file, as follows:
Duplicate it with Ctrl + D.
Rename the new duplicate from
SmallLato 1
toScreenFont
.Select our new ScreenFont prefab file.
The Inspector view displays the following content:
The ScreenFont prefab's Font Type (1) is currently set to Bitmap. Switch it to Reference now. The Inspector panel now looks like this:
You might notice that all the font information has disappeared; this reference font currently points to nothing. Let's make it point to the MediumLato
font by default:
Click on the Font button (1).
Select the MediumLato...