Example #1
0
        private void OnDestroy()
        {
            instance = null;

            GameEvents.onGUIApplicationLauncherUnreadifying.Remove(RemoveButton);
            GameEvents.onVesselWasModified.Remove(onVesselModified);
            GameEvents.onVesselSituationChange.Remove(onSituationChange);
            GameEvents.onVesselChange.Remove(onVesselChange);
        }
Example #2
0
        private void Start()
        {
            instance = this;

            if (icon == null)
            {
                icon = GameDatabase.Instance.GetTexture("KerbNetController/Resources/Toolbar_Icon", false);
            }

            StartCoroutine(Startup());

            StartCoroutine(AddButton());

            GameEvents.onVesselWasModified.Add(onVesselModified);
            GameEvents.onVesselSituationChange.Add(onSituationChange);
            GameEvents.onVesselChange.Add(onVesselChange);
        }