Mouse click in edit mode. ✱✺✸❁

I have a script attached to a GameObject which starts with ExecuteInEditMode() and in which I am using Update() and OnDrawGizmos(). I have a var ev and in OnDrawGizmos I have if (Event.current) ev = Event.current. In Update() there is if (ev.type == EventType.mouseDown). However, the event type is always “Repaint”. What is the problem?

Event.current happens inside OnGUI code - you will never get it to be anything useful in Update. You want to be testing Input.GetMouseDown(0) in Update.