# RestoreOverlay(Overlay, SaveData)

> Restores Overlay state according to the data parameter.

## Definition

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

```csharp
public void RestoreOverlay(Overlay overlay, SaveData data = null)
```

### Parameters

**** (\[Overlay]\(/engine/6000.3/script-reference/unityeditor/overlays/overlay)): The [Overlay](/engine/6000.3/script-reference/unityeditor/overlays/overlay.md) to restore.**** (\[SaveData]\(/engine/6000.3/script-reference/unityeditor/overlays/savedata)): The [SaveData](/engine/6000.3/script-reference/unityeditor/overlays/savedata.md) that contains the state to restore.

### Remarks

Call this method to set the overlay's position, visibility, dock area, etc. according to the values in data.
