Simple(?) Question About Editor Scripting

Is there a fairly straight forward way to capture a point on the terrain based on mouse position over the scene window? I know that, at runtime, you can use ScreenToWorldPoint to do this, but I am working on an editor tool that entails the user clicking on a point in the scene window to indicate a position on the terrain. I don’t know that ScreenToWorldPoint would work in an editor-based tool.

Secondly, is there anything tricky about storing values in variables in editor scripts I should be aware of? As the user can select multiple points, I will need to store those points in an array.

I think Camera.current returns the scene view camera in an editor script. You could use this for a ScreenToWorldPoint call or a raycast against the terrain.

Thanks, Andeeee. I will give that a try.