# SetSearchText(string)

> Sets the search filter text in the HierarchyWindow.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Hierarchy.Editor](/engine/6000.6/script-reference/unity/hierarchy/editor.md)
* **Assembly:** UnityEditor

```csharp
public void SetSearchText(string query)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The filter query text.
