Example #1
0
        void Start()
        {
            ToolbarControl.RegisterMod(Biomatic.MODID, Biomatic.MODNAME);
            if (Instance != null)
            {
                // Reloading of GameDatabase causes another copy of addon to spawn at next opportunity. Suppress it.
                // see: https://forum.kerbalspaceprogram.com/index.php?/topic/7542-x/&do=findComment&comment=3574980
                Destroy(gameObject);
                return;
            }

            Instance = this;
            DontDestroyOnLoad(gameObject);
        }
Example #2
0
 void Destroy()
 {
     Instance = null;
 }