ResoniteModdingGroup / MonkeyLoader.GamePacks.Resonite

MonkeyLoader Game Pack which provides hooks for Resonite mods.
https://resonitemoddinggroup.github.io/MonkeyLoader.GamePacks.Resonite/
GNU Lesser General Public License v3.0
14 stars 2 forks source link

The various (Configured)ResoniteEventHandler don't override OnShutdown to unregister the event handlers #41

Closed Banane9 closed 2 months ago

Banane9 commented 2 months ago

This should be added as they would be expected to work for hot reloading.

It's only necessary when the application isn't shutting down.

    protected override bool OnShutdown(bool applicationExiting)
    {
            if (!applicationExiting)
                Mod.UnregisterEventHandler<TEvent>(this);

            return base.OnShutdown(applicationExiting);
    }