# ExecuteAction(SearchAction, SearchItem[], bool)

> Executes a Search action on a given list of items.

## Definition

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

```csharp
void ExecuteAction(SearchAction action, SearchItem[] items, bool endSearch = true)
```

### Parameters

**** (\[SearchAction]\(/engine/6000.5/script-reference/unityeditor/search/searchaction)): The search action to execute.**** (\[SearchItem\[]]\(/engine/6000.5/script-reference/unityeditor/search/searchitem)): The items to search.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If true, executing this action closes the Search window if the action and the window's state permit it.
