Ejemplo n.º 1
0
        private void DrawMeshPreview(FrameDebuggerEvent curEvent, Rect previewRect, Rect meshInfoRect, Mesh mesh, int meshSubset)
        {
            if (this.m_PreviewUtility == null)
            {
                this.m_PreviewUtility = new PreviewRenderUtility();
                this.m_PreviewUtility.m_CameraFieldOfView = 30f;
            }
            if (this.m_Material == null)
            {
                this.m_Material = EditorGUIUtility.GetBuiltinExtraResource(typeof(Material), "Default-Material.mat") as Material;
            }
            if (this.m_WireMaterial == null)
            {
                this.m_WireMaterial = ModelInspector.CreateWireframeMaterial();
            }
            this.m_PreviewUtility.BeginPreview(previewRect, "preBackground");
            ModelInspector.RenderMeshPreview(mesh, this.m_PreviewUtility, this.m_Material, this.m_WireMaterial, this.m_PreviewDir, meshSubset);
            this.m_PreviewUtility.EndAndDrawPreview(previewRect);
            string name = mesh.name;

            if (string.IsNullOrEmpty(name))
            {
                name = "<no name>";
            }
            object[] objArray1 = new object[] { name, " subset ", meshSubset, "\n", curEvent.vertexCount, " verts, ", curEvent.indexCount, " indices" };
            string   text      = string.Concat(objArray1);

            EditorGUI.DropShadowLabel(meshInfoRect, text);
        }
Ejemplo n.º 2
0
        private void DrawCurrentEvent(Rect rect, FrameDebuggerEvent[] descs)
        {
            int num = FrameDebuggerUtility.limit - 1;

            if (num >= 0 && num < descs.Length)
            {
                GUILayout.BeginArea(rect);
                FrameDebuggerEvent     frameDebuggerEvent = descs[num];
                FrameDebuggerEventData frameDebuggerEventData;
                bool frameEventData = FrameDebuggerUtility.GetFrameEventData(num, out frameDebuggerEventData);
                if (frameEventData)
                {
                    this.DrawRenderTargetControls(frameDebuggerEventData);
                }
                GUILayout.Label(string.Format("Event #{0}: {1}", num + 1, FrameDebuggerWindow.s_FrameEventTypeNames[(int)frameDebuggerEvent.type]), EditorStyles.boldLabel, new GUILayoutOption[0]);
                if (FrameDebuggerUtility.IsRemoteEnabled() && FrameDebuggerUtility.receivingRemoteFrameEventData)
                {
                    GUILayout.Label("Receiving frame event data...", new GUILayoutOption[0]);
                }
                else if (frameEventData)
                {
                    if (frameDebuggerEventData.vertexCount > 0 || frameDebuggerEventData.indexCount > 0)
                    {
                        this.DrawEventDrawCallInfo(frameDebuggerEventData);
                    }
                    else if (frameDebuggerEvent.type == FrameEventType.ComputeDispatch)
                    {
                        this.DrawEventComputeDispatchInfo(frameDebuggerEventData);
                    }
                }
                GUILayout.EndArea();
            }
        }
Ejemplo n.º 3
0
        private bool DrawEventMesh(int curEventIndex, FrameDebuggerEvent curEvent)
        {
            int frameEventMeshID = FrameDebuggerUtility.GetFrameEventMeshID(curEventIndex);

            if (frameEventMeshID == 0)
            {
                return(false);
            }
            UnityEngine.Object @object = EditorUtility.InstanceIDToObject(frameEventMeshID);
            Mesh mesh = @object as Mesh;

            if (mesh == null)
            {
                return(false);
            }
            Rect rect = GUILayoutUtility.GetRect(10f, 10f, new GUILayoutOption[]
            {
                GUILayout.ExpandHeight(true)
            });

            if (rect.width < 64f || rect.height < 64f)
            {
                return(true);
            }
            GameObject gameObjectForEvent = FrameDebuggerWindow.GetGameObjectForEvent(curEventIndex);
            Rect       rect2 = rect;

            rect2.yMin = rect2.yMax - EditorGUIUtility.singleLineHeight * 2f;
            Rect position = rect2;

            rect2.xMin    = rect2.center.x;
            position.xMax = position.center.x;
            if (Event.current.type == EventType.MouseDown)
            {
                if (rect2.Contains(Event.current.mousePosition))
                {
                    EditorGUIUtility.PingObject(frameEventMeshID);
                    Event.current.Use();
                }
                if (gameObjectForEvent != null && position.Contains(Event.current.mousePosition))
                {
                    EditorGUIUtility.PingObject(gameObjectForEvent.GetInstanceID());
                    Event.current.Use();
                }
            }
            this.m_PreviewDir = PreviewGUI.Drag2D(this.m_PreviewDir, rect);
            if (Event.current.type == EventType.Repaint)
            {
                int frameEventMeshSubset = FrameDebuggerUtility.GetFrameEventMeshSubset(curEventIndex);
                this.DrawMeshPreview(curEvent, rect, rect2, mesh, frameEventMeshSubset);
                if (gameObjectForEvent != null)
                {
                    EditorGUI.DropShadowLabel(position, gameObjectForEvent.name);
                }
            }
            return(true);
        }
Ejemplo n.º 4
0
        private bool DrawEventMesh(int curEventIndex, FrameDebuggerEvent curEvent)
        {
            int frameEventMeshID = FrameDebuggerUtility.GetFrameEventMeshID(curEventIndex);

            if (frameEventMeshID == 0)
            {
                return(false);
            }
            Mesh mesh = EditorUtility.InstanceIDToObject(frameEventMeshID) as Mesh;

            if (mesh == null)
            {
                return(false);
            }
            GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandHeight(true) };
            Rect position             = GUILayoutUtility.GetRect((float)10f, (float)10f, options);

            if ((position.width >= 64f) && (position.height >= 64f))
            {
                GameObject gameObjectForEvent = GetGameObjectForEvent(curEventIndex);
                Rect       meshInfoRect       = position;
                meshInfoRect.yMin = meshInfoRect.yMax - (EditorGUIUtility.singleLineHeight * 2f);
                Rect rect3 = meshInfoRect;
                meshInfoRect.xMin = meshInfoRect.center.x;
                rect3.xMax        = rect3.center.x;
                if (Event.current.type == EventType.MouseDown)
                {
                    if (meshInfoRect.Contains(Event.current.mousePosition))
                    {
                        EditorGUIUtility.PingObject(frameEventMeshID);
                        Event.current.Use();
                    }
                    if ((gameObjectForEvent != null) && rect3.Contains(Event.current.mousePosition))
                    {
                        EditorGUIUtility.PingObject(gameObjectForEvent.GetInstanceID());
                        Event.current.Use();
                    }
                }
                this.m_PreviewDir = PreviewGUI.Drag2D(this.m_PreviewDir, position);
                if (Event.current.type == EventType.Repaint)
                {
                    int frameEventMeshSubset = FrameDebuggerUtility.GetFrameEventMeshSubset(curEventIndex);
                    this.DrawMeshPreview(curEvent, position, meshInfoRect, mesh, frameEventMeshSubset);
                    if (gameObjectForEvent != null)
                    {
                        EditorGUI.DropShadowLabel(rect3, gameObjectForEvent.name);
                    }
                }
            }
            return(true);
        }
Ejemplo n.º 5
0
        private void DrawCurrentEvent(Rect rect, FrameDebuggerEvent[] descs)
        {
            int num = FrameDebuggerUtility.limit - 1;

            if (num < 0 || num >= descs.Length)
            {
                return;
            }
            GUILayout.BeginArea(rect);
            FrameDebuggerEvent frameDebuggerEvent = descs[num];

            this.DrawRenderTargetControls(frameDebuggerEvent);
            GUILayout.Label(string.Format("Event #{0}: {1}", num + 1, FrameDebuggerWindow.s_FrameEventTypeNames[(int)frameDebuggerEvent.type]), EditorStyles.boldLabel, new GUILayoutOption[0]);
            if (frameDebuggerEvent.vertexCount > 0 || frameDebuggerEvent.indexCount > 0)
            {
                int frameEventShaderID = FrameDebuggerUtility.GetFrameEventShaderID(num);
                if (frameEventShaderID != 0)
                {
                    Shader shader = EditorUtility.InstanceIDToObject(frameEventShaderID) as Shader;
                    if (shader != null)
                    {
                        int frameEventShaderPassIndex = FrameDebuggerUtility.GetFrameEventShaderPassIndex(num);
                        GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                        if (GUILayout.Button(string.Concat(new object[]
                        {
                            "Shader: ",
                            shader.name,
                            " pass #",
                            frameEventShaderPassIndex
                        }), GUI.skin.label, new GUILayoutOption[]
                        {
                            GUILayout.ExpandWidth(false)
                        }))
                        {
                            EditorGUIUtility.PingObject(shader);
                            Event.current.Use();
                        }
                        GUILayout.Label(FrameDebuggerUtility.GetFrameEventShaderKeywords(num), EditorStyles.miniLabel, new GUILayoutOption[0]);
                        GUILayout.EndHorizontal();
                    }
                }
                if (!this.DrawEventMesh(num, frameDebuggerEvent))
                {
                    GUILayout.Label("Vertices: " + frameDebuggerEvent.vertexCount, new GUILayoutOption[0]);
                    GUILayout.Label("Indices: " + frameDebuggerEvent.indexCount, new GUILayoutOption[0]);
                }
            }
            GUILayout.EndArea();
        }
Ejemplo n.º 6
0
        private void DrawMeshPreview(FrameDebuggerEvent curEvent, Rect previewRect, Rect meshInfoRect, Mesh mesh, int meshSubset)
        {
            if (this.m_PreviewUtility == null)
            {
                this.m_PreviewUtility = new PreviewRenderUtility();
                this.m_PreviewUtility.m_CameraFieldOfView = 30f;
            }
            if (this.m_Material == null)
            {
                this.m_Material = (EditorGUIUtility.GetBuiltinExtraResource(typeof(Material), "Default-Material.mat") as Material);
            }
            if (this.m_WireMaterial == null)
            {
                this.m_WireMaterial                  = new Material(ModelInspector.WireframeShaderSource);
                this.m_WireMaterial.hideFlags        = HideFlags.HideAndDontSave;
                this.m_WireMaterial.shader.hideFlags = HideFlags.HideAndDontSave;
            }
            this.m_PreviewUtility.BeginPreview(previewRect, "preBackground");
            ModelInspector.RenderMeshPreview(mesh, this.m_PreviewUtility, this.m_Material, this.m_WireMaterial, this.m_PreviewDir, meshSubset);
            Texture image = this.m_PreviewUtility.EndPreview();

            GUI.DrawTexture(previewRect, image, ScaleMode.StretchToFill, false);
            string text = mesh.name;

            if (string.IsNullOrEmpty(text))
            {
                text = "<no name>";
            }
            string text2 = string.Concat(new object[]
            {
                text,
                " subset ",
                meshSubset,
                "\n",
                curEvent.vertexCount,
                " verts, ",
                curEvent.indexCount,
                " indices"
            });

            EditorGUI.DropShadowLabel(meshInfoRect, text2);
        }
Ejemplo n.º 7
0
        private void DrawCurrentEvent(Rect rect, FrameDebuggerEvent[] descs)
        {
            int index = FrameDebuggerUtility.limit - 1;

            if ((index >= 0) && (index < descs.Length))
            {
                GUILayout.BeginArea(rect);
                FrameDebuggerEvent cur = descs[index];
                this.DrawRenderTargetControls(cur);
                GUILayout.Label(string.Format("Event #{0}: {1}", index + 1, s_FrameEventTypeNames[(int)cur.type]), EditorStyles.boldLabel, new GUILayoutOption[0]);
                if ((cur.vertexCount > 0) || (cur.indexCount > 0))
                {
                    int frameEventShaderID = FrameDebuggerUtility.GetFrameEventShaderID(index);
                    if (frameEventShaderID != 0)
                    {
                        Shader shader = EditorUtility.InstanceIDToObject(frameEventShaderID) as Shader;
                        if (shader != null)
                        {
                            int frameEventShaderPassIndex = FrameDebuggerUtility.GetFrameEventShaderPassIndex(index);
                            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                            object[]          objArray1 = new object[] { "Shader: ", shader.name, " pass #", frameEventShaderPassIndex };
                            GUILayoutOption[] options   = new GUILayoutOption[] { GUILayout.ExpandWidth(false) };
                            if (GUILayout.Button(string.Concat(objArray1), GUI.skin.label, options))
                            {
                                EditorGUIUtility.PingObject(shader);
                                Event.current.Use();
                            }
                            GUILayout.Label(FrameDebuggerUtility.GetFrameEventShaderKeywords(index), EditorStyles.miniLabel, new GUILayoutOption[0]);
                            GUILayout.EndHorizontal();
                            this.DrawStates();
                        }
                    }
                    if (!this.DrawEventMesh(index, cur))
                    {
                        GUILayout.Label("Vertices: " + cur.vertexCount, new GUILayoutOption[0]);
                        GUILayout.Label("Indices: " + cur.indexCount, new GUILayoutOption[0]);
                    }
                }
                GUILayout.EndArea();
            }
        }
Ejemplo n.º 8
0
        private void DrawRenderTargetControls(FrameDebuggerEvent cur)
        {
            if (cur.rtWidth <= 0 || cur.rtHeight <= 0)
            {
                return;
            }
            bool  disabled = cur.rtFormat == 1 || cur.rtFormat == 3;
            bool  flag     = cur.rtHasDepthTexture != 0;
            short num      = cur.rtCount;

            if (flag)
            {
                num += 1;
            }
            GUILayout.Label("RenderTarget: " + cur.rtName, EditorStyles.boldLabel, new GUILayoutOption[0]);
            GUILayout.BeginHorizontal(EditorStyles.toolbar, new GUILayoutOption[0]);
            EditorGUI.BeginChangeCheck();
            EditorGUI.BeginDisabledGroup(num <= 1);
            GUIContent[] array = new GUIContent[(int)num];
            for (int i = 0; i < (int)cur.rtCount; i++)
            {
                array[i] = FrameDebuggerWindow.Styles.mrtLabels[i];
            }
            if (flag)
            {
                array[(int)cur.rtCount] = FrameDebuggerWindow.Styles.depthLabel;
            }
            int  num2  = Mathf.Clamp(this.m_RTIndex, 0, (int)(num - 1));
            bool flag2 = num2 != this.m_RTIndex;

            this.m_RTIndex = num2;
            this.m_RTIndex = EditorGUILayout.Popup(this.m_RTIndex, array, EditorStyles.toolbarPopup, new GUILayoutOption[]
            {
                GUILayout.Width(70f)
            });
            EditorGUI.EndDisabledGroup();
            GUILayout.Space(10f);
            EditorGUI.BeginDisabledGroup(disabled);
            GUILayout.Label(FrameDebuggerWindow.Styles.channelHeader, EditorStyles.miniLabel, new GUILayoutOption[0]);
            this.m_RTChannel = GUILayout.Toolbar(this.m_RTChannel, FrameDebuggerWindow.Styles.channelLabels, EditorStyles.toolbarButton, new GUILayoutOption[0]);
            EditorGUI.EndDisabledGroup();
            GUILayout.Space(10f);
            GUILayout.Label(FrameDebuggerWindow.Styles.levelsHeader, EditorStyles.miniLabel, new GUILayoutOption[0]);
            EditorGUILayout.MinMaxSlider(ref this.m_RTBlackLevel, ref this.m_RTWhiteLevel, 0f, 1f, new GUILayoutOption[]
            {
                GUILayout.MaxWidth(200f)
            });
            if (EditorGUI.EndChangeCheck() || flag2)
            {
                Vector4 channels = Vector4.zero;
                if (this.m_RTChannel == 1)
                {
                    channels.x = 1f;
                }
                else
                {
                    if (this.m_RTChannel == 2)
                    {
                        channels.y = 1f;
                    }
                    else
                    {
                        if (this.m_RTChannel == 3)
                        {
                            channels.z = 1f;
                        }
                        else
                        {
                            if (this.m_RTChannel == 4)
                            {
                                channels.w = 1f;
                            }
                            else
                            {
                                channels = Vector4.one;
                            }
                        }
                    }
                }
                int num3 = this.m_RTIndex;
                if (num3 >= (int)cur.rtCount)
                {
                    num3 = -1;
                }
                FrameDebuggerUtility.SetRenderTargetDisplayOptions(num3, channels, this.m_RTBlackLevel, this.m_RTWhiteLevel);
                this.RepaintAllNeededThings();
            }
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
            GUILayout.Label(string.Format("{0}x{1} {2}", cur.rtWidth, cur.rtHeight, (RenderTextureFormat)cur.rtFormat), new GUILayoutOption[0]);
            if (cur.rtDim == 4)
            {
                GUILayout.Label("Rendering into cubemap", new GUILayoutOption[0]);
            }
            if (cur.rtFormat == 3 && SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 9"))
            {
                EditorGUILayout.HelpBox("Rendering into shadowmap on DX9, can't visualize it in the game view properly", MessageType.Info, true);
            }
        }
Ejemplo n.º 9
0
 private void DrawRenderTargetControls(FrameDebuggerEvent cur)
 {
     if ((cur.rtWidth > 0) && (cur.rtHeight > 0))
     {
         bool  disabled = (cur.rtFormat == 1) || (cur.rtFormat == 3);
         bool  flag2    = cur.rtHasDepthTexture != 0;
         short rtCount  = cur.rtCount;
         if (flag2)
         {
             rtCount = (short)(rtCount + 1);
         }
         GUILayout.Label("RenderTarget: " + cur.rtName, EditorStyles.boldLabel, new GUILayoutOption[0]);
         GUILayout.BeginHorizontal(EditorStyles.toolbar, new GUILayoutOption[0]);
         EditorGUI.BeginChangeCheck();
         EditorGUI.BeginDisabledGroup(rtCount <= 1);
         GUIContent[] displayedOptions = new GUIContent[rtCount];
         for (int i = 0; i < cur.rtCount; i++)
         {
             displayedOptions[i] = Styles.mrtLabels[i];
         }
         if (flag2)
         {
             displayedOptions[cur.rtCount] = Styles.depthLabel;
         }
         int  num3  = Mathf.Clamp(this.m_RTIndex, 0, rtCount - 1);
         bool flag3 = num3 != this.m_RTIndex;
         this.m_RTIndex = num3;
         GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(70f) };
         this.m_RTIndex = EditorGUILayout.Popup(this.m_RTIndex, displayedOptions, EditorStyles.toolbarPopup, options);
         EditorGUI.EndDisabledGroup();
         GUILayout.Space(10f);
         EditorGUI.BeginDisabledGroup(disabled);
         GUILayout.Label(Styles.channelHeader, EditorStyles.miniLabel, new GUILayoutOption[0]);
         this.m_RTChannel = GUILayout.Toolbar(this.m_RTChannel, Styles.channelLabels, EditorStyles.toolbarButton, new GUILayoutOption[0]);
         EditorGUI.EndDisabledGroup();
         GUILayout.Space(10f);
         GUILayout.Label(Styles.levelsHeader, EditorStyles.miniLabel, new GUILayoutOption[0]);
         GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.MaxWidth(200f) };
         EditorGUILayout.MinMaxSlider(ref this.m_RTBlackLevel, ref this.m_RTWhiteLevel, 0f, 1f, optionArray2);
         if (EditorGUI.EndChangeCheck() || flag3)
         {
             Vector4 zero = Vector4.zero;
             if (this.m_RTChannel == 1)
             {
                 zero.x = 1f;
             }
             else if (this.m_RTChannel == 2)
             {
                 zero.y = 1f;
             }
             else if (this.m_RTChannel == 3)
             {
                 zero.z = 1f;
             }
             else if (this.m_RTChannel == 4)
             {
                 zero.w = 1f;
             }
             else
             {
                 zero = Vector4.one;
             }
             int rTIndex = this.m_RTIndex;
             if (rTIndex >= cur.rtCount)
             {
                 rTIndex = -1;
             }
             FrameDebuggerUtility.SetRenderTargetDisplayOptions(rTIndex, zero, this.m_RTBlackLevel, this.m_RTWhiteLevel);
             this.RepaintAllNeededThings();
         }
         GUILayout.FlexibleSpace();
         GUILayout.EndHorizontal();
         GUILayout.Label(string.Format("{0}x{1} {2}", cur.rtWidth, cur.rtHeight, (RenderTextureFormat)cur.rtFormat), new GUILayoutOption[0]);
         if (cur.rtDim == 4)
         {
             GUILayout.Label("Rendering into cubemap", new GUILayoutOption[0]);
         }
         if ((cur.rtFormat == 3) && SystemInfo.graphicsDeviceVersion.StartsWith("Direct3D 9"))
         {
             EditorGUILayout.HelpBox("Rendering into shadowmap on DX9, can't visualize it in the game view properly", MessageType.Info, true);
         }
     }
 }
Ejemplo n.º 10
0
        private void DrawCurrentEvent(Rect rect, FrameDebuggerEvent[] descs)
        {
            int index = FrameDebuggerUtility.limit - 1;

            if (index < 0 || index >= descs.Length)
            {
                return;
            }
            GUILayout.BeginArea(rect);
            FrameDebuggerEvent     desc = descs[index];
            FrameDebuggerEventData frameDebuggerEventData;
            bool frameEventData = FrameDebuggerUtility.GetFrameEventData(index, out frameDebuggerEventData);

            if (frameEventData)
            {
                this.DrawRenderTargetControls(frameDebuggerEventData);
            }
            GUILayout.Label(string.Format("Event #{0}: {1}", (object)(index + 1), (object)FrameDebuggerWindow.s_FrameEventTypeNames[(int)desc.type]), EditorStyles.boldLabel, new GUILayoutOption[0]);
            if (FrameDebuggerUtility.IsRemoteEnabled() && FrameDebuggerUtility.receivingRemoteFrameEventData)
            {
                GUILayout.Label("Receiving frame event data...");
            }
            else if (frameEventData && (frameDebuggerEventData.vertexCount > 0 || frameDebuggerEventData.indexCount > 0))
            {
                Shader shader          = frameDebuggerEventData.shader;
                int    shaderPassIndex = frameDebuggerEventData.shaderPassIndex;
                GUILayout.BeginHorizontal();
                if (GUILayout.Button("Shader: " + frameDebuggerEventData.shaderName + " pass #" + (object)shaderPassIndex, GUI.skin.label, new GUILayoutOption[1] {
                    GUILayout.ExpandWidth(false)
                }))
                {
                    EditorGUIUtility.PingObject((UnityEngine.Object)shader);
                    Event.current.Use();
                }
                GUILayout.Label(frameDebuggerEventData.shaderKeywords, EditorStyles.miniLabel, new GUILayoutOption[0]);
                GUILayout.EndHorizontal();
                this.DrawStates(frameDebuggerEventData);
                GUILayout.Space(15f);
                this.m_AdditionalInfo = (ShowAdditionalInfo)GUILayout.Toolbar((int)this.m_AdditionalInfo, this.m_AdditionalInfoGuiContents);
                switch (this.m_AdditionalInfo)
                {
                case ShowAdditionalInfo.Preview:
                    if (frameEventData && !this.DrawEventMesh(frameDebuggerEventData))
                    {
                        GUILayout.Label("Vertices: " + (object)frameDebuggerEventData.vertexCount);
                        GUILayout.Label("Indices: " + (object)frameDebuggerEventData.indexCount);
                        break;
                    }
                    break;

                case ShowAdditionalInfo.ShaderProperties:
                    if (frameEventData)
                    {
                        this.DrawShaderProperties(frameDebuggerEventData.shaderProperties);
                        break;
                    }
                    break;
                }
            }
            GUILayout.EndArea();
        }
Ejemplo n.º 11
0
        private void DrawCurrentEvent(Rect rect, FrameDebuggerEvent[] descs)
        {
            int num = FrameDebuggerUtility.limit - 1;

            if (num < 0 || num >= descs.Length)
            {
                return;
            }
            GUILayout.BeginArea(rect);
            FrameDebuggerEvent     frameDebuggerEvent = descs[num];
            FrameDebuggerEventData frameDebuggerEventData;
            bool frameEventData = FrameDebuggerUtility.GetFrameEventData(num, out frameDebuggerEventData);

            if (frameEventData)
            {
                this.DrawRenderTargetControls(frameDebuggerEventData);
            }
            GUILayout.Label(string.Format("Event #{0}: {1}", num + 1, FrameDebuggerWindow.s_FrameEventTypeNames[(int)frameDebuggerEvent.type]), EditorStyles.boldLabel, new GUILayoutOption[0]);
            if (FrameDebuggerUtility.IsRemoteEnabled() && FrameDebuggerUtility.receivingRemoteFrameEventData)
            {
                GUILayout.Label("Receiving frame event data...", new GUILayoutOption[0]);
            }
            else if (frameEventData && (frameDebuggerEventData.vertexCount > 0 || frameDebuggerEventData.indexCount > 0))
            {
                Shader shader          = frameDebuggerEventData.shader;
                int    shaderPassIndex = frameDebuggerEventData.shaderPassIndex;
                GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                if (GUILayout.Button(string.Concat(new object[]
                {
                    "Shader: ",
                    frameDebuggerEventData.shaderName,
                    " pass #",
                    shaderPassIndex
                }), GUI.skin.label, new GUILayoutOption[]
                {
                    GUILayout.ExpandWidth(false)
                }))
                {
                    EditorGUIUtility.PingObject(shader);
                    Event.current.Use();
                }
                GUILayout.Label(frameDebuggerEventData.shaderKeywords, EditorStyles.miniLabel, new GUILayoutOption[0]);
                GUILayout.EndHorizontal();
                this.DrawStates(frameDebuggerEventData);
                GUILayout.Space(15f);
                this.m_AdditionalInfo = (ShowAdditionalInfo)GUILayout.Toolbar((int)this.m_AdditionalInfo, this.m_AdditionalInfoGuiContents, new GUILayoutOption[0]);
                ShowAdditionalInfo additionalInfo = this.m_AdditionalInfo;
                if (additionalInfo != ShowAdditionalInfo.Preview)
                {
                    if (additionalInfo == ShowAdditionalInfo.ShaderProperties)
                    {
                        if (frameEventData)
                        {
                            this.DrawShaderProperties(frameDebuggerEventData.shaderProperties);
                        }
                    }
                }
                else if (frameEventData)
                {
                    if (!this.DrawEventMesh(frameDebuggerEventData))
                    {
                        GUILayout.Label("Vertices: " + frameDebuggerEventData.vertexCount, new GUILayoutOption[0]);
                        GUILayout.Label("Indices: " + frameDebuggerEventData.indexCount, new GUILayoutOption[0]);
                    }
                }
            }
            GUILayout.EndArea();
        }