- Home /
2d game with png sequences slowing on Unity3d
Hello,We are building a tower defence game,In which enemy movement is done through sprite sheets as well the tower rotation is also done through sprites...every tower and every enemy has its own script attached to it which controle its animation...but when enemies and towers are in greater ammount the games slows down..and become laggy on iphone and unity ..can anyone tell what is the problem with it...
Have you tried image texture type mode because it will affect on image resolution and quality, whenever will you increase this your game going to be slow.
Are you using any plugins for the 2D sprites? Or maybe you are doing this on GUI calls ?
Answer by robertbu · May 02, 2013 at 02:56 PM
Click on the stats button on the upper right of the Game window. Take a look at the Drawcalls for your app. In particular take a look at the number of your drawcalls that are batched.
It sounds to me like you have an individual sprite sheet for each animation. You are going to want to drive down the drawcalls by combining the sprite sheets into an atlas. Doing this by hand can be difficult. Third party tools like EZGUI (and maybe NGUI) make this easy. For more information on drawcall batching:
http://docs.unity3d.com/Documentation/Manual/DrawCallBatching.html