Performance: Start and Update methods
MEDIUM IMPACT
This concept affects frame rendering speed and input responsiveness by controlling when and how often code runs during the game loop.
void Start() {
// Initialization runs once
LoadResources();
}
void Update() {
// Frame-based logic here
}void Update() {
// Heavy initialization every frame
LoadResources();
}| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Heavy code in Update | N/A | Blocks frame rendering | High paint delay | [X] Bad |
| Initialization in Start | N/A | No frame blocking | Low paint delay | [OK] Good |
| Spread heavy work with coroutine | N/A | Minimal frame blocking | Smooth paint | [OK] Good |