Incorrect Unity Execution Order for OnApplicationQuit?

I’m aware of this doc that tells the execution order of Unity events:

There’s also a beautiful chart:
alt text

However, recently I put Debug.Log messages in OnDisable and OnApplicationQuit, and it seems like OnApplicationQuit is actually called first, contrary to what the chart shows. Is this just my copy of Unity, or does everyone else get the same thing?

Of course OnApplicationQuit is executed before OnDisable and OnDestroy since it’s

Sent to all game objects before the
application is quit

If Unity would destroy the objects before sending OnApplicationQuit there would be no gameobject that could receive that message.

The final OnDisable (as well as OnDestroy) will be invoked as a result of destroying the object when the application quits. Also note there are no arrows within the “decommissioning” section.

The chart might be a bit misleading. Since a lot of these messages can be invoked in different cases, that chart can never cover all situations at once. If it would there would be arrows and lines all over the place. That chart mainly shows the mainloop and everything related to that.

For example “OnEnable” is positioned before “Start”. However if a Gameobject was already “started”, got disabled and is enabled again OnEnable will be called again but Start won’t. Another thing is the way the physics step is described. It doesn’t cover the case when a physics step is skipped. In that case the update loop should bypass the whole physics block. In a real flowchart all conditional events (OnCollisionXXX, OnMouseXXX, OnBecameVisible, …) would need a bypass as well.