Hello, guys!
I seek for an advice to improve performance of my game. It’s a 2d game, I use object pooling technic that is pretty much the same as given on live training tutorials. I have a prefab of a simple sprite image with a script attached:
So, I instantiate this prefabs in a special way randomly at the top of the screen by .SetActive(true) and give them needed position. When moving down, sprites have a little laggy trembling, it is not very noticeable on in the editor and devices with powerful CPU, but it become very laggy on low CPU.
Every Sprite has collider2D attached to it and there are only two triggers to enable and disable this sprites.
I tried also to move the camera only and but the laggy result is the same.
I have 16 objects in my pool. (i think that this amount is impossible to effect GPU and CPU performance, maybe the problem is in the wrong method of moving objects?) Low CPU device is Samsung galaxy Ace 2 (Dual Core 800MHz Processor).
But it is also not so evenly smoot on Nexus 7 g2 and iPhone 4s, there can be a bit of laggy trembling seldom.
Back to my Corona SDK practice, there was no such problem.
I uploaded the part of my project. This lag is present even when i comment the 9 line in Instantiation.cs, so that only 3 objects move.
Unfortunately, I don’t have a pro license, so i can’t use a profiler to check leaks. The actual frame rate in the editor is 60, on devices is the same 60, but on Nexus it goes pretty smooth, not to say about Galaxy Ace2 and editor.
I would appreciate if someone could check my project.
I tried to implement that behaviour, it seems like problem is not in SetActive and iTween(as i tried standart unity Translate() and also just to change transform.position manually)