Frame per seconds down from 30 to 9

I am having trouble with fps right now. I have no idea why fps drops from 30 frame per seconds to 9 frame per seconds.
Can anyone explain to me ?

iPhone Unity internal profiler stats:
cpu-player> min: 9.0 max: 16.7 avg: 11.2
cpu-ogles-drv> min: 0.9 max: 1.7 avg: 1.1
cpu-waits-gpu> min: 0.2 max: 1.0 avg: 0.3
msaa-resolve> min: 0.0 max: 0.0 avg: 0.0
cpu-present> min: 0.4 max: 0.5 avg: 0.4
frametime> min: 33.3 max: 37.2 avg: 33.8
draw-call #> min: 22 max: 22 avg: 22 | batched: 0
tris #> min: 13537 max: 13537 avg: 13537 | batched: 0
verts #> min: 6779 max: 6779 avg: 6779 | batched: 0
player-detail> physx: 0.3 animation: 1.9 culling 0.0 skinning: 3.8 batching: 0.0 render: 2.4 fixed-update-count: 1 … 2
mono-scripts> update: 1.5 fixedUpdate: 0.0 coroutines: 0.1
mono-memory> used heap: 303104 allocated heap: 479232 max number of collections: 0 collection total duration: 0.0

iPhone Unity internal profiler stats:
cpu-player> min: 76.7 max: 121.7 avg: 88.0
cpu-ogles-drv> min: 0.8 max: 1.7 avg: 1.0
cpu-waits-gpu> min: 0.2 max: 0.3 avg: 0.2
msaa-resolve> min: 0.0 max: 0.0 avg: 0.0
cpu-present> min: 0.5 max: 4.6 avg: 0.9
frametime> min: 80.5 max: 128.3 avg: 93.2
draw-call #> min: 20 max: 21 avg: 20 | batched: 0
tris #> min: 13503 max: 13535 avg: 13516 | batched: 0
verts #> min: 6751 max: 6775 avg: 6760 | batched: 0
player-detail> physx: 1.1 animation: 75.6 culling 0.0 skinning: 3.4 batching: 0.0 render: 1.6 fixed-update-count: 4 … 6
mono-scripts> update: 1.8 fixedUpdate: 0.0 coroutines: 3.8
mono-memory> used heap: 458752 allocated heap: 479232 max number of collections: 0 collection total duration: 0.0

iPhone Unity internal profiler stats:
cpu-player> min: 24.5 max: 106.5 avg: 75.7
cpu-ogles-drv> min: 0.7 max: 6.0 avg: 1.3
cpu-waits-gpu> min: 0.2 max: 3.0 avg: 0.3
msaa-resolve> min: 0.0 max: 0.0 avg: 0.0
cpu-present> min: 0.5 max: 1.1 avg: 0.8
frametime> min: 33.5 max: 111.9 avg: 78.4
draw-call #> min: 17 max: 21 avg: 19 | batched: 0
tris #> min: 5099 max: 15612 avg: 10226 | batched: 0
verts #> min: 3183 max: 7649 avg: 5364 | batched: 0
player-detail> physx: 0.6 animation: 59.2 culling 0.0 skinning: 2.6 batching: 0.0 render: 4.0 fixed-update-count: 1 … 5
mono-scripts> update: 1.8 fixedUpdate: 0.0 coroutines: 4.1
mono-memory> used heap: 385024 allocated heap: 479232 max number of collections: 0 collection total duration: 0.0

iPhone Unity internal profiler stats:
cpu-player> min: 69.3 max: 86.1 avg: 78.2
cpu-ogles-drv> min: 0.8 max: 1.7 avg: 0.9
cpu-waits-gpu> min: 0.2 max: 0.9 avg: 0.3
msaa-resolve> min: 0.0 max: 0.0 avg: 0.0
cpu-present> min: 0.5 max: 4.4 avg: 0.9
frametime> min: 72.9 max: 91.4 avg: 83.4
draw-call #> min: 20 max: 21 avg: 20 | batched: 0
tris #> min: 13503 max: 13535 avg: 13515 | batched: 0
verts #> min: 6751 max: 6775 avg: 6760 | batched: 0
player-detail> physx: 0.9 animation: 64.7 culling 0.0 skinning: 3.4 batching: 0.0 render: 2.0 fixed-update-count: 4 … 5
mono-scripts> update: 2.1 fixedUpdate: 0.0 coroutines: 4.2
mono-memory> used heap: 450560 allocated heap: 479232 max number of collections: 0 collection total duration: 0.0

Drops when you do what?

When playing game.

I have four enemies and one player in the scene. I just tested it by using iphone joystick to move around the player.

When the player is walking and the enemies are in the scene and follows the player, frame rate drops.
when player is not walking, All enemies are in the scene, frame rate isn’t going down.
when player is walking alone, frame rate doesn’t drop also.

No idea why

I guess you need to optimize your scripts a lot.

–Eric

Your profiler would suggest that its animation, since your frametime spent on animation jumps to enormous heights. (I’m seeing 60-70ms) How many individually moving parts do your characters have? I use animation heavily in my games, with many dozens of bones moving around at a time and rarely see frametime in excess of 10ms, so you must have some seriously complicated stuff moving around, or you’re blending/layering an insane amount of clips.

MikaMobile,

frametime should be lower than 10?