# OnSelectionClosed(Preset)

> This method is called by the PresetSelector when the modal window is closed.

## Definition

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

> **Warning:**
>
> **Deprecated.** The PresetSelectorReceiver is deprecated. Please use PresetSelector.ShowSelector(Object\[], Preset, bool) instead.

```csharp
public virtual void OnSelectionClosed(Preset selection)
```

### Parameters

**** (\[Preset]\(/engine/6000.6/script-reference/unityeditor/presets/preset)):&#x20;

### Remarks

You must use this method to destroy your [PresetSelectorReceiver](/engine/6000.6/script-reference/unityeditor/presets/presetselectorreceiver.md) object. For an example, consult the [DefaultPresetSelectorReceiver.OnSelectionClosed](/engine/6000.6/script-reference/unityeditor/presets/defaultpresetselectorreceiver/onselectionclosed.md) documentation.
