public static void UnDetour() { try { DetourUtils.RevertRedirect(playClickSoundOriginal, playClickSoundState); Mod.Instance.Log.Debug("UIComponent.PlayClickSound() detour has been reverted"); } catch (Exception ex) { Mod.Instance.Log.Error("Exception while reverting detour UIComponent.PlayClickSound(): {0}", ex); } try { DetourUtils.RevertRedirect(playDisabledClickSoundOriginal, playDisabledClickSoundState); Mod.Instance.Log.Debug("UIComponent.PlayDisabledClickSound() detour has been reverted"); } catch (Exception ex) { Mod.Instance.Log.Error("Exception while reverting detour UIComponent.PlayDisabledClickSound(): {0}", ex); } }