I'm making a 2d game for ios using unity. While making the game I began having an issue with lag, and I thought it was because I was using a lot of create/destroy functions, but after making a gameobject pool I was disappointed to see the lag still there. I have searched for hours and can't fix it. The unusual thing about it is that after restarting the scene 3 or 4 times the lag is completely gone. I have about a total of 800 lines of code, I'm not using instantiate, destroy, or any kind of find functions, and there are about 20 objects active at any time.
Thanks in advance.
↧