Inheritance: UnityEngine.MonoBehaviour
Exemple #1
0
        public void Awake()
        {
            // This thing gets instantiated 4 times by KSP for some reason
            if (Fetch != null) return;
            Fetch = this;

            var gObj = new GameObject("kOSTermWindow", typeof(TermWindow));
            UnityEngine.Object.DontDestroyOnLoad(gObj);
            Window = (TermWindow)gObj.GetComponent(typeof(TermWindow));
        }
Exemple #2
0
        public void Awake()
        {
            if (Fetch == null) // Instantiation now happens every time the menu comes up
            {
                print ("****************** init confirmed");

                Fetch = this;

                var gObj = new GameObject("kOSTermWindow", typeof(TermWindow));
                UnityEngine.Object.DontDestroyOnLoad(gObj);
                Window = (TermWindow)gObj.GetComponent(typeof(TermWindow));
                Window.Core = this;
            }
        }