- Home /
Is there a way to batch a sprite sheet/atlas out of an image sequence in Unity 4.3?
I am making a game with many unique characters that requires they all be on one sprite sheet, so rather than have to finalize all the characters at once I'd like to be able to bring them in as an image sequence one character at a time. The problem with that is that draw calls go through the roof with image sequences whereas one sprite sheet would have only 1 draw call. Is there a way for Unity to batch together an image sequence (or several image sequences) into one sprite sheet/ atlas so it becomes 1 draw call? I am using the Unity 4.3 2D.
Answer by esalczynski · Jan 12, 2014 at 04:27 PM
I was wondering the same thing. Prior to using the built-in Unity sprite textures in 4.3, I was using a 3rd party plugin that used Unity's dynamic batching because the sprites' Mesh Renderers all shared the same Material (who's Texture was the sprite sheet). However, it doesn't appear as though that's how Unity handles rendering sprite textures in 4.3.
And unfortunately at this time, it looks like Unity doesn't batch Sprite Renderer calls. From the docs: "Currently, only Mesh Renderers and Particle Systems are batched. This means that skinned meshes, cloth, trail renderers and other types of rendering components are not batched."
So right now, it seems like your options are 1) Use a 3rd party plugin for your sprite sheets that takes advantage of Unity's "dynamic batching," or 2) buy the pro version to so you can use Unity's "static batching."
EDIT: I may be wrong about dynamic batching not working for Sprite Renderers. It doesn't appear to be working for me, but one of the developers says it should. See this discussion here: http://forum.unity3d.com/threads/211021-Optimization-using-the-new-2D-tools