Update moves the player every frame; FixedUpdate applies physics at fixed intervals.
Execution Table
Step
Time (seconds)
Method Called
Action
Notes
1
0.00
Update
MovePlayer called
First frame update
2
0.02
FixedUpdate
ApplyPhysics called
Physics step 1
3
0.03
Update
MovePlayer called
Second frame update
4
0.04
FixedUpdate
ApplyPhysics called
Physics step 2
5
0.06
FixedUpdate
ApplyPhysics called
Physics step 3 (FixedUpdate called twice due to frame delay)
6
0.06
FixedUpdate
ApplyPhysics called
Physics step 4 (FixedUpdate called twice due to frame delay)
7
0.06
Update
MovePlayer called
Third frame update
8
0.08
FixedUpdate
ApplyPhysics called
Physics step 5
9
0.09
Update
MovePlayer called
Fourth frame update
10
0.10
FixedUpdate
ApplyPhysics called
Physics step 6
11
0.12
Update
MovePlayer called
Fifth frame update
12
0.12
FixedUpdate
ApplyPhysics called
Physics step 7
Exit
End
Stop
Game loop continues
Execution trace ends here
💡 Game loop continues indefinitely; FixedUpdate runs at fixed intervals, Update runs every frame.
Variable Tracker
Variable
Start
After Step 1
After Step 2
After Step 3
After Step 4
After Step 5
After Step 6
After Step 7
After Step 8
After Step 9
After Step 10
After Step 11
Final
frameCount
0
1
1
2
2
2
2
3
3
4
4
5
5
fixedUpdateCount
0
0
1
1
2
3
4
4
5
5
6
7
7
Key Moments - 3 Insights
Why does FixedUpdate sometimes run multiple times between two Update calls?
Because FixedUpdate runs at fixed time intervals independent of frame rate, if frames are slow, FixedUpdate can run multiple times to catch up, as shown in step 5 and 6 where FixedUpdate runs twice before the next Update.
Can physics calculations be done inside Update instead of FixedUpdate?
No, physics should be done in FixedUpdate because it runs at consistent intervals, ensuring stable and predictable physics behavior, unlike Update which varies with frame rate.
Why is Update called more frequently than FixedUpdate in some cases?
Update is called every frame, which can vary in time, while FixedUpdate is called at fixed intervals, so if frame rate is high, Update runs more often than FixedUpdate.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the value of fixedUpdateCount after step 5?
A3
B4
C2
D5
💡 Hint
Check the fixedUpdateCount value in the variable_tracker after step 5.
At which step does FixedUpdate run twice before the next Update?
AStep 4
BStep 5
CStep 6
DStep 7
💡 Hint
Look at the execution_table rows where FixedUpdate is called twice with the same time.
If the frame rate drops, how does FixedUpdate behave compared to Update?
AFixedUpdate runs less often than Update
BBoth run at the same frequency
CFixedUpdate runs more often than Update to catch up
DFixedUpdate stops running
💡 Hint
Refer to the explanation in key_moments about FixedUpdate running multiple times when frames are slow.
Concept Snapshot
Update runs every frame and handles input and animations.
FixedUpdate runs at fixed time intervals for physics.
FixedUpdate can run multiple times per frame if frame rate is low.
Use Update for frame-dependent tasks.
Use FixedUpdate for physics and consistent timing.
Full Transcript
In Unity, the game loop calls Update every frame to handle tasks like input and animations. FixedUpdate runs at fixed time intervals to handle physics calculations. This means FixedUpdate can run multiple times between two Update calls if the frame rate is slow, ensuring physics stays stable. Update frequency depends on frame rate and can vary. Physics should always be done in FixedUpdate for consistent behavior. The execution table shows Update and FixedUpdate calls over time, with variable tracking for frameCount and fixedUpdateCount. Key moments clarify why FixedUpdate runs multiple times sometimes and why physics belongs there. The visual quiz tests understanding of these timings and counts.