- Home /
Question by
Nyfinscyf · Jul 01, 2016 at 02:13 PM ·
movementaxiscustom editorscene view
Scene View Axis of Movement
In a custom editor in the scene view I want to be able to execute some code when the UP axis of movement is NOT selected. Is there a way to determine which control is selected before digesting the event in my OnSceneGUI()?
void OnSceneGUI() {
if(/*UP AXIS*/) {
return; // use unity default action
}
if (Event.current.isMouse
&& Event.current.button == 0
&& Event.current.type == EventType.MouseDrag) {
// do some stuff
Event.current.Use();
}
}
.
capture.png
(27.3 kB)
Comment