# OnGUI(Rect)

> Callback for drawing GUI controls for the popup window.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public virtual void OnGUI(Rect rect)
```

### Parameters

**** (\[Rect]\(/engine/6000.7/script-reference/unityengine/rect)): The rectangle to draw the GUI inside.

### Remarks

Additional Resources: [PopupWindow](/engine/6000.7/script-reference/unityeditor/popupwindow.md) with full example.
