How do I shut down a Simulator gracefully?

(Original topic)

Is there a recommended way of shutting down a Simulator gracefully? Right now, I call Application.Quit(), but wondering if there is a “cleaner” way of doing this that works well with the SDK/engine?

I ask because there is a good amount of output from calling Application.Quit(), which I’m not sure is expected or not.

This is a working solution:

IEnumerator CloseAfter(int i)
    this.LogWarn($"Closing after {i} seconds...");
    yield return new WaitForSeconds(i);