protected override void Awake()
 {
     if (HighLogic.LoadedScene != GameScenes.EDITOR) {
         Warning ("The editor search function works only on the on the Editor. Destroy.", "QEditor");
         Destroy (this);
         return;
     }
     if (Instance != null) {
         Warning ("There's already an Instance of " + MOD + ". Destroy.", "QEditor");
         Destroy (this);
         return;
     }
     Instance = this;
     QSettings.Instance.Load ();
     if (!QSettings.Instance.EditorSearch) {
         Warning ("The editor search function is disabled. Destroy.", "QEditor");
         Destroy (this);
         return;
     }
     base.Awake ();
     Log ("Awake", "QEditor");
 }
Beispiel #2
0
 protected override void Awake()
 {
     if (HighLogic.LoadedScene != GameScenes.EDITOR)
     {
         QDebug.Warning("The editor search function works only on the on the Editor. Destroy.", "QEditor");
         Destroy(this);
         return;
     }
     if (Instance != null)
     {
         QDebug.Warning("There's already an Instance of " + RegisterToolbar.MOD + ". Destroy.", "QEditor");
         Destroy(this);
         return;
     }
     Instance = this;
     if (!QSettings.Instance.EditorSearch)
     {
         QDebug.Warning("The editor search function is disabled. Destroy.", "QEditor");
         Destroy(this);
         return;
     }
     base.Awake();
     QDebug.Log("Awake", "QEditor");
 }