Game Development Reference
In-Depth Information
To slice or not to slice
As we progress through this topic, you will notice that some assets are single textures,
whereas others contain multiple images and you may wonder which method is best to cre-
ate your assets and why it is best.
The answer (as it is in a lot of these situations) depends on the needs of your title.
It is always better to pack many of the same images on to a single asset/atlas and then use
the Sprite Editor to define the regions on that texture for each sprite, as long as all the
sprites on that sheet are going to get used in the same scene. The reason for this is when
Unity tries to draw to the screen, it needs to send the images to draw to the graphics card;
if there are many images to send, this can take some time. If, however, it is just one im-
age, it is a lot simpler and more performant with only one file to send.
There needs to be a balance; too large an image and the upload to the graphics card can
take up too many resources, too many individual images and you have the same problem.
The basic rule of thumb is as follows:
• If the background is a full screen background or large image, then keep it separ-
ately.
• If you have many images and all are for the same scene, then put them into a
spritesheet/atlas.
• If you have many images but all are for different scenes, then group them as best
you can—common items on one sheet and scene-specific items on different
sheets. You'll have several spritesheets to use.
You basically want to keep as much stuff together as makes sense and not send unneces-
sary images that won't get used to the graphics card. Find your balance.
Search WWH ::




Custom Search