I’m working on an editor script that will allow me to modify meshes on the fly in my game. Currently, my object draws lines, vertices, and face handles over the existing mesh using the Handles drawing functions.
Is there a built-in way to handle a clickable GUI object that doesn’t by default do anything, but allow the player to click on it without losing focus to the object in the heirarchy?
If not, I’m assuming that there is a way to cancel the mouse click event’s default behavior by calling Event.Use() after the MouseEvent has been registered by the currently selected Editor.
Essentially, when the player has the “Edit” button depressed in the inspector, I don’t want the player to be able to lose focus on the current object unless he manually selects another object in the Heirarchy window. I know it’s possible, seeing as the terrain editor does this, but is there a simple built-in way to do this? I REALLY want to avoid doing this manually… As so far it’s been an absolute nightmare thus far.