# SetActive(string, bool)

> Activates or deactivates a search provider. Call Refresh after this to take effect on the next search.

## Definition

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

```csharp
public static void SetActive(string providerId, bool active = true)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Search provider ID to activate or deactivate.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Activation state.
