Editor: calling event.use() prevents gizmos from being drawn

If I do something like this…

[CustomEditor(typeof(mycomponent)]
public class MyEditorClass: Editor	
{

void OnSceneGUI()
{				
	Event e = Event.current;

	//if the shift key is being held down
	if (e.shift)
	{
		//do stuff
		e.use()
	}
}
}

ie. Have a custom editor class that does something when shift is held down. All the time shift is held down the gizmos for everything are not drawn. I guess this is because I am using all the events before they are drawn.
Is there some way to tell the gizmos to draw anyway?

Note: I believe I need to use the event every OnSceneGUI(), otherwise the stuff I’m doing in it does not get updated, for instance when I move the mouse.

Ok, I solved this just after posting this question!!

If I only use the event in the case the event type being something I care about (like the mouse moving of being clicked then its ok) :slight_smile:

		[CustomEditor(typeof(mycomponent)]
		public class yourEditorClass: Editor	
		{

			void OnSceneGUI()
			{				
				Event e = Event.current;
				
				if (e.shift)
				{
					switch (e.type)
					{				
						case EventType.mouseDown:				
							Debug.Log("mousedown");
							e.Use();
							break;
									
						case EventType.mouseUp:			
							Debug.Log("mouseup");
							e.Use();
							break;
							
						case EventType.MouseMove:
							//Do my moving stuff here
							Debug.Log("move");
							e.Use();
							break;
								
						case EventType.layout:
							HandleUtility.AddDefaultControl(cID);
							break;
				}
			}
		}