public void OnDestroy() { if (HighLogic.LoadedSceneIsEditor) { // Nothing configured, nothing to destroy. return; } if (renderTex != null) { UnityEngine.Object.Destroy(renderTex); renderTex = null; } JUtil.DisposeOfGameObjects(new GameObject[] { ladderMesh, progradeLadderIcon, overlayMesh, headingMesh, progradeHeadingIcon }); for (int i = 0; i < verticalBars.Count; ++i) { JUtil.DisposeOfGameObjects(new GameObject[] { verticalBars[i].barObject }); verticalBars[i] = null; } verticalBars.Clear(); for (int i = 0; i < horizontalBars.Count; ++i) { JUtil.DisposeOfGameObjects(new GameObject[] { horizontalBars[i].barObject }); horizontalBars[i] = null; } horizontalBars.Clear(); }
public void OnDestroy() { if (HighLogic.LoadedSceneIsEditor) { // Nothing configured, nothing to destroy. return; } JUtil.DisposeOfGameObjects(new GameObject[] { navBall, overlay, heading, markerPrograde, markerRetrograde, markerManeuver, markerManeuverMinus, markerTarget, markerTargetMinus, markerNormal, markerNormalMinus, markerRadial, markerRadialMinus, markerDockingAlignment, markerNavWaypoint }); }
public void OnDestroy() { if (HighLogic.LoadedSceneIsEditor) { // Nothing configured, nothing to destroy. return; } JUtil.DisposeOfGameObjects(new GameObject[] { ladderMesh, progradeLadderIcon, overlayMesh, headingMesh, progradeHeadingIcon }); for (int i = 0; i < verticalBars.Count; ++i) { JUtil.DisposeOfGameObjects(new GameObject[] { verticalBars[i].barObject }); } }