Esempio n. 1
0
 public static void Close()
 {
     if (null != _ins)
     {
         GameObject.Destroy(_ins.gameObject);
         _ins = null;
     }
 }
Esempio n. 2
0
File: Log.cs Progetto: tuita520/Zero
        /// <summary>
        /// 在一个UI面板中显示一条日志消息
        /// </summary>
        /// <param name="content"></param>
        public static void GUI(string content)
        {
            if (!IsActive)
            {
                return;
            }

            content = string.Format("[{0}] {1}", DateTime.Now.ToString("HH:mm:ss.fff"), content);
            Debug.Log(content);
            GUILog.Show(content);
        }
Esempio n. 3
0
        public static void Show(string content)
        {
            if (null == _ins)
            {
                const string NAME = "GUILog";
                GameObject   go   = new GameObject();
                go.name = NAME;
                _ins    = go.AddComponent <GUILog>();
                DontDestroyOnLoad(go);
            }

            _ins.SetContent(content);
        }