Triple calls to FixedUpdate on a single object

I’m getting a strange profiler result on the latest iphone build.

I have a single manager in my game called HiveMind which handles updating group behaviour and positioning for monsters. I run it in FixedUpdate() so it only updates when the monsters move anyway. The weird thing is that the profiler say I have 3 calls to the HiveMind.FixedUpdate(), but there’s only one HiveMind instance in the level. The calls are something like 4ms (the one that makes kind of sense) 10ms and 15ms. So obviously hard to ignore : )

Testing in the Editor profiler, the FixedUpdate has one call less.

Physics will run fixedupdate more than one time per loop, and sometimes more than once on startup. This is because fixedupdate has to run several times per frame if it cannot keep up with the rendering speed.

If fixedUpdate is set at 50fps (default) and you’re running at 20fps, it’s going to run probably more than twice.

Aha! Thanks, that makes sense. On the iphone my FPS drops below the fixedUpdate when the profiler is on. (And to be fair, other times too, trying to fix that :smile:). In the editor the FixedUpdate is defined to run at 60fps together with the framerate, so I usually have 1 call, occasionally getting two when the fps goes below 60.

If the calls are all legitimate, that leaves me with the problem of figuring out why they’re taking so long.