Alt F4 to sound fade out...Could such a feature exist?

Since Alt + F4 is a system shortcut command, entering this command will immediately terminate the program. However, in the case of the recently released Tekken 8, when you press Alt + F4, the sound fades out with a grace period of about 0.5 seconds. Does anyone know the middleware or production method related to this?

The question doesn’t seem to be related to FMOD, but rather to Unity.

The solution:

  1. Subscribe on wantsToQuit event. Event handler should return false on first hit.
  2. On Alt+F4 this event will be triggered, start sound fadeout and timer to quit app.
  3. When fadeout finished or timer expired, call Quit, this also triggers wantsToQuit again.
  4. On the second hit event handler should return true.

See Application.wantsToQuit and Application.Quit

Hope this helps!