How to display a visual representation of a dynamic object in the Unity editor

I have a script that generates geometry on the fly based on various parameters. I’d like to be able to display something in the Unity editor that is either the same geometry or at least a bounding box or something that the user can see, click on to select, etc.

I’ve seen the suggestion of using a child object and deleting it on start. That won’t work for me because the child will have to be changed anytime the parameters of the procedural mesh are changed so a child object is not really a representation of the final result.

Is there a way, from script, to give the unity editor something to display in the editor only and register mouse clicks on?

How about either Unity - Scripting API: Gizmos or Unity - Scripting API: ExecuteInEditMode plus Unity - Scripting API: GL?