public void OnDestroy() { RenderingManager.RemoveFromPostDrawQueue(5, drawGUI); GameEvents.onVesselChange.Remove(vesselSwitch); PresetManager.saveToFile(); bHdgActive = false; bVertActive = false; }
public void OnDestroy() { SaveConfig(); if (Toolbar.ToolbarManager.ToolbarAvailable && !bUseStockToolbar) { ToolbarMod.Instance.OnDestroy(); } BindingManager.Instance.OnDestroy(); GameEvents.onHideUI.Remove(hideUI); GameEvents.onShowUI.Remove(showUI); PresetManager.saveToFile(); instance = null; }