Draw Calls

Draw calls are the rendering “calls” that the graphics API has to perform. What this means is that for every GameObject that Unity cannot batch together, it has to perform a draw call. Although it would be pretty tough to not have any, the fewer Unity has to process, the better the performance. A good number is around 20 when working with mobile platforms.

Sprites

As we are dealing with 2D sprites, this is a big area for controlling draw calls. If each sprite had to use its own draw call, we would easily kill our frame rate trying to load our Scene. Luckily, we can use sprite atlases to manage multiple sprites on one sheet. This way, we are using only a single draw call to render them.

Sprites can also be set to “Static” and then ...

Get Learning 2D Game Development with Unity®: A Hands-On Guide to Game Creation 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.