# UnregisterCustomHandler(string)

> Unregisters the current handler and validator for the given key

## Definition

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

```csharp
public static void UnregisterCustomHandler(string key)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A unique string that identifies the selection handler.

### Remarks

If all history for a given handler is now invalid, the entire handler can be unregistered. This removes the handler and any History elements registered with this Handler key. Any related validator is also unregistered. Additional Resources: [Selection.RegisterCustomHandler](/engine/6000.7/script-reference/unityeditor/selection/registercustomhandler.md), [Selection.SetCustomSelection](/engine/6000.7/script-reference/unityeditor/selection/setcustomselection.md).
