private void OnSceneGUI() { Event evt = Event.current; switch (evt.type) { case EventType.MouseDrag: if (evt.button == 0) { if (HandleDrag(evt)) { evt.Use(); } } break; case EventType.MouseUp: if (evt.button == 0) { if (HandleMouseUp(evt)) { evt.Use(); } WalkableFloorEditor.RestoreTool(); } break; case EventType.MouseDown: if (evt.button == 0) { if (HandleMouseDown(evt)) { evt.Use(); } else { WalkableFloorEditor.RestoreTool(); } } break; case EventType.KeyDown: if (evt.keyCode == KeyCode.T) { if ((target as Waypoint).transform.parent != null) { Selection.activeGameObject = (target as Waypoint).transform.parent.gameObject; } } break; } helpOpen = WalkableFloorEditor.ShowHelpControls(helpOpen); }
private void OnSceneGUI() { Event evt = Event.current; switch (evt.type) { case EventType.MouseDrag: if (evt.button == 0) { if (HandleDrag(evt)) { evt.Use(); } } break; case EventType.MouseUp: if (evt.button == 0) { if (HandleMouseUp(evt)) { evt.Use(); } WalkableFloorEditor.RestoreTool(); } break; case EventType.MouseDown: if (evt.button == 0) { if (HandleMouseDown(evt)) { evt.Use(); } else { WalkableFloorEditor.RestoreTool(); } } break; } helpOpen = WalkableFloorEditor.ShowHelpControls(helpOpen); }