# CreatePanelContent()

> CreatePanelContent is invoked by the OverlayCanvas when this Overlay is shown.

## Definition

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

```csharp
public override sealed VisualElement CreatePanelContent()
```

### Returns

| Type                                                                                     | Description                                                                                              |
| ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| [VisualElement](/engine/6000.7/script-reference/unityengine/uielements/visualelement.md) | Returns the contents of this [Overlay](/engine/6000.7/script-reference/unityeditor/overlays/overlay.md). |

### Remarks

IMGUIOverlay implements this function. The only method IMGUIOverlay must implement is the [IMGUIOverlay.OnGUI](/engine/6000.7/script-reference/unityeditor/overlays/imguioverlay/ongui.md) method.
