예제 #1
0
        public void OnGUI()
        {
            GUILayout.BeginHorizontal();
            _showLog     = DebugConsole.GUIToggle("Log", _showLog);
            _showWarning = DebugConsole.GUIToggle("Warning", _showWarning);
            _showError   = DebugConsole.GUIToggle("Error", _showError);
            GUILayout.EndHorizontal();

            for (int i = 0; i < _logs.Count; i++)
            {
                LogWrapper wrapper = _logs[i];
                if (wrapper.Type == LogType.Log)
                {
                    if (_showLog)
                    {
                        DebugConsole.GUILable(wrapper.Log);
                    }
                }
                else if (wrapper.Type == LogType.Warning)
                {
                    if (_showWarning)
                    {
                        DebugConsole.GUIYellowLable(wrapper.Log);
                    }
                }
                else
                {
                    if (_showError)
                    {
                        DebugConsole.GUIRedLable(wrapper.Log);
                    }
                }
            }
        }
예제 #2
0
        public void OnGUI()
        {
            // 过滤信息
            FilterInfos();

            GUILayout.BeginHorizontal();
            {
                GUILayout.Label("搜索关键字 : ", DebugConsole.GUILableStyle, GUILayout.Width(140));
                _filterKey = GUILayout.TextField(_filterKey, DebugConsole.GUITextFieldStyle, GUILayout.Width(400));
            }
            GUILayout.EndHorizontal();

            GUILayout.Space(10);
            DebugConsole.GUILable($"加载器总数:{_loaderTotalCount}");
            for (int i = 0; i < _cacheInfos.Count; i++)
            {
                var element = _cacheInfos[i];
                if (element.LoadState == EAssetFileLoadState.LoadAssetFileFailed)
                {
                    DebugConsole.GUIRedLable(element.Info);
                }
                else
                {
                    DebugConsole.GUILable(element.Info);
                }
            }
        }
예제 #3
0
        public void OnGUI()
        {
            var pools = PoolManager.Instance.DebugAllPools;

            DebugConsole.GUILable($"池总数:{pools.Count}");
            foreach (var pair in pools)
            {
                string content = $"[{pair.Value.ResName}] CacheCount = {pair.Value.Count} SpwanCount = {pair.Value.SpawnCount}";
                if (pair.Value.LoadResult == MotionEngine.Res.EAssetResult.Failed)
                {
                    DebugConsole.GUIRedLable(content);
                }
                else
                {
                    DebugConsole.GUILable(content);
                }
            }
        }