# OnSelectionChange()

> Called when the selection changes.

## Definition

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

```csharp
public virtual void OnSelectionChange()
```
