Game Development Reference
In-Depth Information
It's also worth noting a bit of best practice with project setup (something I
went into in great depth in my previous topic). To keep things clean and
organized in the sample project accompanying this topic, each type of
object in the project is organized into its own folder, for example:
• Scenes
• Sprites
• Scripts
That way you can always find what you need and know where it will be.
Setting up the project
As with the previous chapters, you can either set up a new project to test the
following examples or keep using the same project (or even use the sample project
contained in the code download).
If you are setting up a new project, it can be either 2D or 3D (it makes no difference
to the UI system).
However, if you are setting up in 3D, remember that images will be
imported as Textures by default, so you will need to change them to
Sprites after importing them.
A warning on the built-in images
Throughout this chapter, we will refer to the selection of built-in images that
come bundled with Unity and are used as the default image for a lot of the
UI control templates.
At the time of writing, these images are bundled as separate images and not on a
combined spritesheet. Because they are separate images, they will need separate
draw calls per control/image to render them to the screen.
If you use your own images and batch them together in a single spritesheet, your UI
screen will be a lot more performant and use fewer draw calls.
 
Search WWH ::




Custom Search