I need a simple script which does the following:
When I left-click somewhere in the Editor-Scene:
(doesnt matter if there is an object under the cursor- or not)
Do NOT deselect the current selection in the Inspector. Do not select the object under the cursor. and
Just print the mouse X and Z interception with the Y-Plane in the Debug.Log();
i stumbled on many solutions but somehow i couldnt get this to work.
Tools.current = Tool.None;
both seem to do nothing ..... X.x
Happens that "HandleUtility.AddDefaultControl(GUIUtility.GetControlID(FocusType.Passive));" needs to be inside: public void OnSceneGUI() and called every frame - to "block" the mouse clicks on the editor. i thought it toggles it off.
still the problem of the mouse coordinates persists.