- Home /
Android: FPS halt when doing things for the first time
Here is what I am doing:
I recycle an object using a recycle manager
Play a particle effect when a gameobject is recycled.
The problem is this: It gives a total FPS stop when the first gameobject is recycled. But after this it runs smoothly at 56fps. I tested this on a single core and dual core android devices, both had the same issue. On the PC there are no issues. I do not have the Pro-lisence so I can't use the profiler.
Are there any common reasons for Android devices for this sort of behaviour?
I did some testing: It really happens on the first time only. I loaded other scenes and then returned to the game screen. After returning to the game screen, there was no stutter when recycling the objects for the first time after loading.
Answer by Vonni · Jan 23, 2013 at 11:41 AM
Maybe do a monkey fix. Do a recycle on awake or start? :)
Aye, this is the last resort I have had in $$anonymous$$d. First I'd love to learn what causes the stutter and try to fix it "properly" :).
Answer by aldonaletto · Jan 23, 2013 at 12:04 PM
Which recycle manager are you using? It seems that this particular one is doing lots of things when used the first time, maybe instantiating several objects to let them in the pool. You could follow @Vonni's suggestion and create the first objects at Start, so after that you would have no more hiccups. Another suggestion: try a simple object pool script like the one in this answer.
Your answer
Follow this Question
Related Questions
Can anyone maintain smooth 60fps on Android (2D) ? 0 Answers
Is it possible to attach extra variables to a particle via a script?(such as damage done) 1 Answer
Weird streak effect, particle sprites, Android but not all devices 1 Answer
PARICLE SYSTEM ON MOBILE FOR WATER SPLASH 0 Answers
Why is this stuttering so much? 0 Answers