Exemple #1
0
 protected override void Draw(bool readOnly)
 {
     if (GUILayout.Button(string.Format("Inspect Static Members of {0}...", target)))
     {
         InspectorChildWindow.OpenStatic(target as Type, true, allowPrivate, false, true, false, null);
     }
     base.Draw(readOnly);
 }
        public void Draw()
        {
            if (searchTypeResult == null || searchTypeResult.Length == 0)
            {
                return;
            }
            GUIContent temp = new GUIContent();

            GUILayout.BeginVertical();
            GUILayout.Space(8);
            GUILayout.Label(
                $"Type Search Result ({searchTypeResult.Length}):",
                EditorStyles.boldLabel
                );
            GUILayout.Space(8);
            int i = 0;

            foreach (Type type in searchTypeResult)
            {
                if (i++ >= 500)
                {
                    break;
                }
                temp.text    = type.FullName;
                temp.tooltip = type.AssemblyQualifiedName;
                if (GUILayout.Button(temp, EditorStyles.foldout))
                {
                    InspectorChildWindow.OpenStatic(type, true, true, true, true, false, null);
                }
            }
            if (searchTypeResult.Length != i)
            {
                EditorGUILayout.HelpBox(
                    "Too many results, please try more specific search phase.",
                    MessageType.Warning
                    );
            }
            GUILayout.Space(8);
            GUILayout.EndVertical();
        }