I m getting some jerking/freezing issue in my Car game. I was instantiating some enemy cars on a checkpoint when a player hits a previous checkpoint, but this was too much jerking. So i changed some logic and instead of instantiating object i use just transform changed. Now my game is less freezing but still i want a complete solution for this. If any one have faced this situation earlier please help.
Really hard to tell from the information giving.
Impossible for us to know what happens in your game that causes the slowdown.
Here is my best guess for optimization.
Create a pool of objects that are to be instantiated, and rather disable/enable them as needed that creating them in the middle of the game.
Write or get a tool like Pool Manager http://poolmanager.path-o-logical.com/
I dont think that my prefab are too much complex and i m using only 5 instances at a time.
so there is no requirement of using PooL manAger.
well thanks for suggestion.