# OnBeforeSerialize()

> Invoked before OverlayCanvas will be serialized. This is used to store Overlay layout data.

## Definition

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

```csharp
public void OnBeforeSerialize()
```
