Inheritance: UnityEngine.MonoBehaviour
示例#1
0
文件: Core.cs 项目: ElasticRaven/KOS
        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));
        }
示例#2
0
文件: Core.cs 项目: Nivekk/KOS
        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;
            }
        }