Chapter 6. Atlas and Font Customization

In this chapter, we will learn how to create a new atlas and add our own assets. At the end of this chapter, you will know how to handle normal, sliced, and tiled sprites.

We will use these new assets to add icons to our powers and selected powers. We will also change the backgrounds of our different windows, and add a new font to our project.

A small exercise will let you customize your main menu as you see fit before we move on to the final chapter. First, we need to learn how to create our own Game atlas.

The Atlas prefab

With NGUI, an Atlas prefab is used to contain sprites and fonts. It is composed of the following:

  • A large texture file containing all sprites and fonts
  • A material with this texture file assigned, and a specific shader

The Atlas prefab has a UIAtlas component attached to it. Its purpose is to contain information about your sprites' positions and sizes in the large texture.

It is much more efficient to use only one large texture that holds all our sprites, instead of having separate multiple small textures.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.50.156