void OnFocus()
{
if (painting)
{
EndStroke();
}
SceneView.onSceneGUIDelegate -= this.OnSceneGUI;
SceneView.onSceneGUIDelegate += this.OnSceneGUI;
Undo.undoRedoPerformed -= this.OnUndo;
Undo.undoRedoPerformed += this.OnUndo;
this.titleContent = new GUIContent("Vertex Paint");
Repaint();
}