예제 #1
0
        void RebuildView()
        {
            ClearNodes();

            Node settingGroup = CreateCategories("Setting");

            AddCheckbox("Show base classes", _isShowBaseClass, OnShowBaseClassChanged, settingGroup);

            foreach (var monoInfo in _monoInfos)
            {
                Node group = CreateCategories(monoInfo.name);
                foreach (var componentInfo in monoInfo.componentInfos)
                {
                    _sb.Length = 0;
                    _sb.AppendFormat("<size=110%>{0}<size=85%>\n", TextColors.GetUniqueColorWithTag(componentInfo.name));
                    foreach (var fieldInfo in componentInfo.fieldInfos)
                    {
                        _sb.AppendFormat("{0}<alpha=#66>({1})<alpha=#FF> - {2}\n\n", fieldInfo.name, fieldInfo.type, fieldInfo.value);
                    }

                    AddResizableText(_sb.ToString(), group);

                    // if not showing base class, break after the first iteration
                    if (!_isShowBaseClass)
                    {
                        break;
                    }
                }
            }
        }
예제 #2
0
        void AddChannelNode(int hash, string name)
        {
            bool   enable    = LogFilter.Instance.IsChannelEnabled(hash);
            string colorName = TextColors.GetUniqueColorWithTag(name);
            Node   node      = AddCheckbox(colorName, enable, OnChannelEnableChanged, _channelCategoryNode);

            node.data = hash;
        }
예제 #3
0
        static string GetNameWithColors(string[] channels)
        {
            for (int i = 0; i < channels.Length; i++)
            {
                channels[i] = TextColors.GetUniqueColorWithTag(channels[i]);
            }

            return(string.Format(LogConsoleSettings.Instance.channelFormat, string.Join(",", channels)));
        }