- Home /
iOS. Jerks in first 15-20 seconds after starting scene
We develop a iOS first person shooter (Unity PRO version)
Game freezes for a short periods in first 15-20 seconds of running a scene (jerks).
Jerks occurs on first player's shot, and when enemy appears in camera, and in other moments
After first 15-20 seconds of game jerks disappears.
We examine game with profiler (on iOS device)
Profiler shows CPU spikes at moments of jerks.
Profiler points to several our scripts.
These scripts doesnt contain any big calculations.
In one of them profiler points to Update() (nothing heavy),
in several others profielr points to [Coroutine MoveNext],
OnGUI ,
enemy death handler (when player kills an enemy),
and on Loading.ReadObject.
We tried to call Shader.WarmupAllShaders at start of the level.
Situation remains the same, plus a several second freeze appears at start of level, when WarmupAllShaders() works
In our release build on iOS jerks remains.
How should we solve this problem?
What should we do?
Thank you.
Your answer
Follow this Question
Related Questions
Optimizing Projectile Creation and Destruction 2 Answers
Large level loading best practices 1 Answer
Why do my first few collectable/powerup collisions cause lag but not later ones? 1 Answer
Game crashing on iOS after 3 second load of new scene. (How can I optimise loading) 0 Answers
iOS lag(slow-mo) 1 Answer