Esempio n. 1
0
 public void EmitSomeLogs()
 {
     Logger.LogDebug(null, "TestDebug");
     Logger.LogInfo(null, "TestInfo");
     Logger.LogWarning(null, "TestWarning");
     Logger.LogError(null, "TestError");
     Logger.LogException(null, new TestException());
     Logger.Assert(null, false, "TestAssert");
 }
Esempio n. 2
0
        /// <summary>
        /// 初始化View
        /// </summary>
        protected override void Awake()
        {
#if UNITY_EDITOR
            var time1 = DateTime.Now;
#endif

            if (BtnGo == null)
            {
                Logger.LogWarning("UI", "找不到控件: btnGo");
            }

            if (TxtInfo == null)
            {
                Logger.LogWarning("UI", "找不到控件: txtInfo");
            }

            if (LayOver == null)
            {
                Logger.LogWarning("UI", "找不到控件: layOver");
            }

            if (ProBar == null)
            {
                Logger.LogWarning("UI", "找不到控件: proBar");
            }

            Presenter = new TestPresenter();
            OnAwakeFinish();

#if UNITY_EDITOR
            var time2 = DateTime.Now;
            var diff  = time2 - time1;
            Logger.LogInfo("UI", $"View Created: vwTest, cost {diff.TotalMilliseconds}ms");
#else
            Logger.LogInfo("UI", "View Created: vwTest");
#endif
        }