Esempio n. 1
0
        public void InitGui()
        {
            string     name       = "GUI";
            GameObject gameObject = GameObject.Find(name);

            if (gameObject != null)
            {
                return;
            }
            GameObject original = Util.LoadPrefab(name);

            gameObject      = UnityEngine.Object.Instantiate <GameObject>(original);
            gameObject.name = name;
        }
Esempio n. 2
0
        /// <summary>
        /// 初始化GUI
        /// </summary>
        public void InitGui()
        {
            string     name = "GUI";
            GameObject gui  = GameObject.Find(name);

            if (gui != null)
            {
                return;
            }

            GameObject prefab = Util.LoadPrefab(name);

            gui      = Instantiate(prefab) as GameObject;
            gui.name = name;
        }