/// <summary> /// Called to draw the GUI in scene view. /// </summary> /// <param name="sceneView">Scene View.</param> protected override void OnSceneViewGUI(SceneView sceneView) { base.OnSceneViewGUI(sceneView); Rect cameraRect = sceneView.camera.pixelRect; Rect guiRect = new Rect(cameraRect.width - (WIDTH + SCREEN_PADDING_X), cameraRect.height - (HEIGHT + SCREEN_PADDING_Y), WIDTH, HEIGHT); Color backgroundColor = GUI.backgroundColor; if (!EditorGUIUtility.isProSkin) { GUI.backgroundColor = new Color(backgroundColor.r, backgroundColor.g, backgroundColor.b, 0.8f); } Rect windowRect = GUILayout.Window(s_WindowId, guiRect, DrawWindowContents, GetWindowTitle(), HydraEditorGUIStyles.windowStyle); GUI.backgroundColor = backgroundColor; // Correct for the header windowRect.y -= 16; HydraEditorUtils.EatMouseInput(windowRect, s_WindowId); }