Editor: Force Hand tool

I’m creating a plugin for the Editor that will allow me to edit meshes (vertices, edges, tris). While in edit mode (state where the mesh is editable), I would like to force the Editor to use the Hand tool. The reason is simple: with other tools, the Editor don’t trigger Event.MouseUp within my OnSceneGUI.

Example:

// Force the editor to select a gameobject
Selection.activeGameObject = myGameObject;

// Force the editor to enter Hand tool?
Application.activeSceneTool = SceneTool.Hand

Is there a way to achieve Tool selection in Unity 3.3?

One year later…

// Switch editor tool to Hand tool
// Tool enum contains all 4 tools (Hand, Move, Rotate, Scale)
Tools.current = Tool.View;

These need to be called from inside OnSceneGUI.

void EnableToolGizmo() {
	FieldInfo field = typeof(SceneView).GetField("s_ToolGizmoDisabled", BindingFlags.Static | BindingFlags.NonPublic);
	field.SetValue(typeof(SceneView), false);
}

void DisableToolGizmo() {
	FieldInfo field = typeof(SceneView).GetField("s_ToolGizmoDisabled", BindingFlags.Static | BindingFlags.NonPublic);
	field.SetValue(typeof(SceneView), true);
}