UnityEditor.ClothInspector.OnPreSceneGUICallback C# (CSharp) Method

OnPreSceneGUICallback() private method

private OnPreSceneGUICallback ( SceneView sceneView ) : void
sceneView SceneView
return void
        private void OnPreSceneGUICallback(SceneView sceneView)
        {
            if (this.editing && (base.targets.Length <= 1))
            {
                Tools.current = Tool.None;
                if (this.state.ToolMode == ~ToolMode.Select)
                {
                    this.state.ToolMode = ToolMode.Select;
                }
                ClothSkinningCoefficient[] coefficients = this.cloth.coefficients;
                if ((this.m_Selection.Length != coefficients.Length) && (this.m_Selection.Length != s_MaxVertices))
                {
                    this.OnEnable();
                }
                Handles.BeginGUI();
                int controlID = GUIUtility.GetControlID(FocusType.Passive);
                Event current = Event.current;
                switch (current.GetTypeForControl(controlID))
                {
                    case EventType.Layout:
                        HandleUtility.AddDefaultControl(controlID);
                        break;

                    case EventType.MouseMove:
                    case EventType.MouseDrag:
                    {
                        int mouseOver = this.m_MouseOver;
                        this.m_MouseOver = this.GetMouseVertex(current);
                        if (this.m_MouseOver != mouseOver)
                        {
                            SceneView.RepaintAll();
                        }
                        break;
                    }
                }
                ToolMode toolMode = this.state.ToolMode;
                if (toolMode == ToolMode.Select)
                {
                    this.SelectionPreSceneGUI(controlID);
                }
                else if (toolMode == ToolMode.Paint)
                {
                    this.PaintPreSceneGUI(controlID);
                }
                Handles.EndGUI();
            }
        }