private void OnDestroy() { instance = null; this.OnGUIApplicationLauncherDestroyed(); // Force the destruction of the Current Button GameEvents.onEditorPartPlaced.Remove(this.OnEditorPartPlaced); GameEvents.onEditorPartPicked.Remove(this.OnEditorPartPicked); GameEvents.onGUIApplicationLauncherDestroyed.Remove(this.OnGUIApplicationLauncherDestroyed); GameEvents.onGUIApplicationLauncherReady.Remove(OnGUIApplicationLauncherReady); }
private void Awake() { instance = this; }