HarmonyX
HarmonyX copied to clipboard
Harmony Unpatch and repatching causes transpiler IL errors
Not sure if this use case can be fixed or not, but with a hot loader, it has no issue with prefix or postfix reloading, but if you reload a transpiler it will have unknown location IL errors.
Are you sure it's not caused by other transpliers running before or something similar? I'm fairly sure I've reloaded transpliers in the past with no ill effects. See if you can isolate the issue and provide a way to reproduce it. Always avoid using index offsets in transpliers and instead use CodeMatcher with ThrowIf statement scattered in between to ensure the method is what you think it is.