private bool drawHeader(AnalyzedBase analyzed, EDataType type, string index, string name)
        {
            string subshaderFolderName     = string.Format("{0} {1} {2}", type.ToString(), index, name);
            AnalyzedShaderDataBase shader  = analyzed as AnalyzedShaderDataBase;
            GUIContent             content = new GUIContent(subshaderFolderName, shader != null ? shader.SourceCode : string.Empty);

            m_FolderMap[analyzed] = GUITools.DrawHeader(content, false, m_FolderMap[analyzed], true);

            return(m_FolderMap[analyzed]);
        }
        private void OnGUI()
        {
            m_ScrollPosition     = GUILayout.BeginScrollView(m_ScrollPosition, false, true);
            m_SettingsFolderOpen = GUITools.DrawHeader("设置", false, m_SettingsFolderOpen, true);
            if (m_SettingsFolderOpen)
            {
                GUITools.BeginContents(GUITools.Styles.WizardBoxStyle);

                EditorGUI.BeginDisabledGroup(ShaderAnalyzer.Instance.CurrentStageType != EAnalyzeStageType.None);
                m_CurrentShader = EditorGUILayout.ObjectField(new GUIContent("Shader"), m_CurrentShader, typeof(Shader), false) as Shader;
                m_SkipUnused    = EditorGUILayout.Toggle(new GUIContent("是否跳过当前场景未使用的变体", ""), m_SkipUnused);
                EditorGUI.BeginChangeCheck();
                m_APIType = (EAPIType)EditorGUILayout.EnumPopup(new GUIContent("要编译的着色器语言类型"), m_APIType,
                                                                (Enum index) =>
                {
                    bool show = true;
                    switch ((EAPIType)index)
                    {
                    case EAPIType.None:
                    case EAPIType.All:
                    case EAPIType.Vulkan:
                        show = false;
                        break;
                    }

                    return(show);
                },
                                                                false
                                                                );
                if (EditorGUI.EndChangeCheck())
                {
                    initVendors();
                }

                EditorGUI.BeginChangeCheck();
                m_VendorsSelected = EditorGUILayout.Popup(new GUIContent("GPU厂商"), m_VendorsSelected, m_Vendors);
                if (EditorGUI.EndChangeCheck())
                {
                    initVendor();
                }

                m_GPUModelsSelected = EditorGUILayout.Popup(new GUIContent("目标GPU模型"), m_GPUModelsSelected, m_ModelNames);

                EditorGUI.BeginDisabledGroup(m_CurrentShader == null);

                if (GUILayout.Button("解析"))
                {
                    if (m_CurrentVendor.VendorType == EGPUVendorType.Mali)
                    {
                        if (string.IsNullOrEmpty(Settings.MaliOfflineCompilePath))
                        {
                            Debug.LogError("请设置Mali离线编译器路径!");
                            return;
                        }
                    }
                    ShaderAnalyzer.Instance.Analyze(this.getAnalyzeParams(), analyzeCallback);
                    GUITools.ClearContentDepth();
                    GUIUtility.ExitGUI();
                }

                EditorGUI.EndDisabledGroup();
                EditorGUI.EndDisabledGroup();

                GUITools.EndContents();
            }

            if (m_AnalyzedData != null)
            {
                EditorGUILayout.Space();

                EditorGUI.BeginChangeCheck();

                m_AnalyzedDataDrawType = (EAnalyzedDataViewType)EditorGUILayout.EnumPopup(m_AnalyzedDataDrawType);
                if (EditorGUI.EndChangeCheck())
                {
                    ViewerMap[m_AnalyzedDataDrawType].Init(m_AnalyzedData);
                }

                EditorGUILayout.LabelField("解析数据");

                GUITools.BeginContents(GUITools.Styles.WizardBoxStyle);
                EditorGUILayout.BeginVertical();

                EditorGUILayout.LabelField("GPU信息 : ", m_AnalyzedData.GPUModelInfo.ModelName);
                EditorGUILayout.LabelField("硬件信息 : ", m_AnalyzedData.Hardware);
                EditorGUILayout.LabelField("驱动信息 : ", m_AnalyzedData.Driver);

                EditorGUILayout.EndVertical();
                GUITools.EndContents();
                ViewerMap[m_AnalyzedDataDrawType].Draw();
            }
            GUILayout.EndScrollView();
        }