# OnActivate(string, VisualElement)

> Overrides SettingsProvider.OnActivate for this AssetSettingsProvider.

## Definition

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

```csharp
public override void OnActivate(string searchContext, VisualElement rootElement)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Search context in the search box on the Settings window.**** (\[VisualElement]\(/engine/6000.7/script-reference/unityengine/uielements/visualelement)): Root of the UIElements tree. If you add to this root, the SettingsProvider uses UIElements instead of calling [SettingsProvider.OnGUI](/engine/6000.7/script-reference/unityeditor/settingsprovider/ongui.md) to build the UI. If you do not add to this VisualElement, then you must use the IMGUI to build the UI.
