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;
            }
        }