# OnLostFocus()

> Called when the window loses keyboard focus.

## Definition

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

```csharp
public void OnLostFocus()
```

### Remarks

Additional Resources: OnFocus. ![OrthographicPreviewer (OnLostFocus())](/api/media?file=/engine/6000.0/media/images/OrthographicPreviewer.png) *Restores normal view when you lose focus on this window.*

### Examples

```csharp

{code Modules/UIElements/Tests/UIElementsExamples/Assets/EditorWindowCodeExamples/OrthographicPreview.cs}
```
