UnityEditor.View.DebugHierarchy C# (CSharp) Method

DebugHierarchy() private method

private DebugHierarchy ( int level ) : string
level int
return string
        internal string DebugHierarchy(int level)
        {
            string str = "";
            string str2 = "";
            for (int i = 0; i < level; i++)
            {
                str = str + "  ";
            }
            object[] objArray1 = new object[] { str2, str, this.ToString(), " p:", this.position };
            str2 = string.Concat(objArray1);
            if (this.children.Length > 0)
            {
                str2 = str2 + " {\n";
                foreach (View view in this.children)
                {
                    str2 = str2 + view.DebugHierarchy(level + 2);
                }
                return (str2 + str + " }\n");
            }
            return (str2 + "\n");
        }

Usage Example

示例#1
0
        internal string DebugHierarchy(int level)
        {
            string text  = string.Empty;
            string text2 = string.Empty;

            for (int i = 0; i < level; i++)
            {
                text += "  ";
            }
            text2 = string.Concat(new object[]
            {
                text2,
                text,
                this.ToString(),
                " p:",
                this.position
            });
            if (this.children.Length > 0)
            {
                text2 += " {\n";
                View[] children = this.children;
                for (int j = 0; j < children.Length; j++)
                {
                    View view = children[j];
                    text2 += view.DebugHierarchy(level + 2);
                }
                text2 = text2 + text + " }\n";
            }
            else
            {
                text2 += "\n";
            }
            return(text2);
        }