How to disable the default transform gizmo in editor?

I have put together a simple tool to build a basic mesh right in the editor by defining a series of points. The points can be tweaked via Editor.OnSceneGUI() and Handles.Slider2D(). However, the default transform gizmo is still there and gets in the way – it often “steals” the mouse input when I’m trying to click on a custom gizmo that’s just under it.

This snippet, placed inside of OnSceneGUI(), successfully prevents the default transform gizmo from being painted:

if(Event.current.type == EventType.Layout || 
   Event.current.type == EventType.Repaint) {
      Event.current.Use();
}

However, it also prevents the drawing of the scene view widget (in the top right corner), which seems slightly less than ideal. I feel that there must be an option (or a more selective filter on Event.current) that I could filter for that would do what I’m looking for, but my Google-fu is failing me today.

Know this is a little old but incase anyone else stumbles across this issue.

In your editor class:

Tool lastTool = Tool.None;

void OnEnable()
{
	lastTool = Tools.current;
	Tools.current = Tool.None;
}

void OnDisable()
{
	Tools.current = lastTool;
}

And probably in your OnSceneGUI

Tools.current = Tool.None;