UnityEditor.SceneView.DoDrawCamera C# (CSharp) Method

DoDrawCamera() private method

private DoDrawCamera ( Rect cameraRect, bool &pushedGUIClip ) : void
cameraRect UnityEngine.Rect
pushedGUIClip bool
return void
        private void DoDrawCamera(Rect cameraRect, out bool pushedGUIClip)
        {
            pushedGUIClip = false;
            if (this.m_Camera.gameObject.activeInHierarchy)
            {
                DrawGridParameters gridParam = this.grid.PrepareGridRender(this.camera, this.pivot, this.m_Rotation.target, this.m_Size.value, this.m_Ortho.target, AnnotationUtility.showGrid);
                Event current = Event.current;
                if (this.UseSceneFiltering())
                {
                    if (current.type == EventType.Repaint)
                    {
                        Handles.EnableCameraFx(this.m_Camera, true);
                        Handles.SetCameraFilterMode(this.m_Camera, Handles.FilterMode.ShowRest);
                        float fade = Mathf.Clamp01((float) (EditorApplication.timeSinceStartup - this.m_StartSearchFilterTime));
                        Handles.DrawCamera(cameraRect, this.m_Camera, this.m_RenderMode);
                        Handles.DrawCameraFade(this.m_Camera, fade);
                        Handles.EnableCameraFx(this.m_Camera, false);
                        Handles.SetCameraFilterMode(this.m_Camera, Handles.FilterMode.ShowFiltered);
                        if (s_AuraShader == null)
                        {
                            s_AuraShader = EditorGUIUtility.LoadRequired("SceneView/SceneViewAura.shader") as Shader;
                        }
                        this.m_Camera.SetReplacementShader(s_AuraShader, "");
                        Handles.DrawCamera(cameraRect, this.m_Camera, this.m_RenderMode);
                        this.m_Camera.SetReplacementShader(this.m_ReplacementShader, this.m_ReplacementString);
                        Handles.DrawCamera(cameraRect, this.m_Camera, this.m_RenderMode, gridParam);
                        if (fade < 1f)
                        {
                            base.Repaint();
                        }
                    }
                    Rect position = cameraRect;
                    if (current.type == EventType.Repaint)
                    {
                        RenderTexture.active = null;
                    }
                    GUI.EndGroup();
                    GUI.BeginGroup(new Rect(0f, 17f, base.position.width, base.position.height - 17f));
                    if (current.type == EventType.Repaint)
                    {
                        GL.sRGBWrite = QualitySettings.activeColorSpace == ColorSpace.Linear;
                        GUI.DrawTexture(position, this.m_SceneTargetTexture, ScaleMode.StretchToFill, false, 0f);
                        GL.sRGBWrite = false;
                    }
                    Handles.SetCamera(cameraRect, this.m_Camera);
                    this.HandleSelectionAndOnSceneGUI();
                }
                else
                {
                    if (this.SceneCameraRendersIntoRT())
                    {
                        GUIClip.Push(new Rect(0f, 0f, base.position.width, base.position.height), Vector2.zero, Vector2.zero, true);
                        pushedGUIClip = true;
                    }
                    Handles.DrawCameraStep1(cameraRect, this.m_Camera, this.m_RenderMode, gridParam);
                    this.DrawRenderModeOverlay(cameraRect);
                }
            }
        }