function OnMouseDown in edit mode

How would you do a function OnMouseDown in edit mode? Adding @script ExecuteInEditMode () doesn’t cut it.

From the docs on ExecuteInEditMode():

"ExecuteInEditMode Inherits from Attribute
Makes a script execute in edit mode.

By default scripts are only executed in playmode. By adding this attribute, each script instance will always have its Update, FixedUpdate, and OnGUI functions executed every frame while the Editor is running."

You could use events for the mouse, though.