krypto5863 / COM-Modular-Installer

This repo is dedicated to the COM Modular Installer. An installer built in Inno Setup.
GNU General Public License v3.0
205 stars 13 forks source link

please change in COM3D2\scripts\*.cs files #5

Closed lilly1987 closed 2 years ago

lilly1987 commented 3 years ago

https://github.com/BepInEx/HarmonyX/wiki/Patching-with-Harmony#unpatching-all-methods-of-an-instance

please change in COM3D2\scripts*.cs files

    public static void Unload() {
        //instance.UnpatchAll();//before
        instance.UnpatchSelf();//after 1
        //instance.UnpatchAll(instance.Id); //or after 2
        instance = null;
    }
krypto5863 commented 3 years ago

I'll see about doing this soon. Some scripts don't like this very much as the ScriptLoader needs a recompilation to include the new UnpatchSelf() method. instance.UnpatchAll(instance.Id) has the exact same effect though but also has the same issue.