# OnDestroy()

> Called when Device Simulator window is destroyed.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.DeviceSimulation](/engine/6000.7/script-reference/unityeditor/devicesimulation.md)
* **Assembly:** UnityEditor.DeviceSimulatorModule

```csharp
public virtual void OnDestroy()
```
