public void OnDestroy() { if (graphWindow != null) { graphWindow.save_settings(); graphWindow.shown = false; } if (GameEvents.onGUIApplicationLauncherReady != null) { GameEvents.onGUIApplicationLauncherReady.Remove(onAppLauncherLoad); } if (GameEvents.onGUIApplicationLauncherUnreadifying != null) { GameEvents.onGUIApplicationLauncherUnreadifying.Remove(onAppLauncherUnload); } if (GameEvents.onEditorRestart != null) { GameEvents.onEditorRestart.Remove(TurnOffCoL); } if (GameEvents.onEditorShipModified != null) { GameEvents.onEditorShipModified.Remove(EditorPartEvent); } if (new_CoL_marker != null) { Destroy(new_CoL_marker); } graphWindow = null; }
public void OnDestroy() { GameEvents.onEditorRestart.Remove(new EventVoid.OnEvent(TurnOffCoL)); GraphWindow.save_settings(); GraphWindow.shown = false; }