# OnCreated()

> OnCreated is invoked when an Overlay is instantiated in an Overlay Canvas.

## Definition

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

```csharp
public virtual void OnCreated()
```

### Remarks

Overlays are usually initialized and destroyed with the [EditorWindow](/engine/6000.7/script-reference/unityeditor/editorwindow.md) in which they exist.
