I am working on a custom editor that allows the user to connect one object to another. It ads the selected object to a variable and does some calculation based on the selection.
What i want to do is have the user push a button in the inspector, then a gizmo will be drawn on each of the selectable objects. The user clicks one of the objects to connect to.
The problem is that whenever another object is click the selection changes and the custom inspector is no longer used. So what i want to do is somehow use up the click when a certain type of is clicked, after the “Connect to…” button in the custom inspector has been clicked.
Is there any way to achieve this?
I have tried using Event.current.Use() but it doesn’t seem to do the trick.