Skip to content
Valk edited this page Sep 19, 2024 · 2 revisions

Tips

Tip

To run code just before the game exits, you can subscribe to the OnQuit event.

// This is an async function because you way want to await certain processes before the game exists
Global.Services.Get<Global>().OnQuit += async () =>
{
    // Execute your code here
    await Task.FromResult(1);
}
Clone this wiki locally