# SearchAction

> Default constructor to build a search action.

## Definition

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

## SearchAction(string, string, GUIContent)

Default constructor to build a search action.

```csharp
public SearchAction(string providerId, string id, GUIContent content)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The search provider ID that supports this action.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Unique action id used to find it back later.**** (\[GUIContent]\(/engine/6000.6/script-reference/unityengine/guicontent)): Displays the displayname, an icon, and a tooltip when displaying the action in the Action Menu.

## SearchAction(string, string, GUIContent, Action\<SearchItem\[]>)

Default constructor to build a search action.

```csharp
public SearchAction(string providerId, string id, GUIContent content, Action<SearchItem[]> handler)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The search provider ID that supports this action.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Unique action id used to find it back later.**** (\[GUIContent]\(/engine/6000.6/script-reference/unityengine/guicontent)): Displays the displayname, an icon, and a tooltip when displaying the action in the Action Menu.**** (\[Action\<SearchItem\[]>]\(https\://learn.microsoft.com/dotnet/api/system.action)): Handler that executes the action.

## SearchAction(string, string, GUIContent, Action\<SearchItem>)

Default constructor to build a search action.

```csharp
public SearchAction(string providerId, string id, GUIContent content, Action<SearchItem> handler)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The search provider ID that supports this action.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Unique action id used to find it back later.**** (\[GUIContent]\(/engine/6000.6/script-reference/unityengine/guicontent)): Displays the displayname, an icon, and a tooltip when displaying the action in the Action Menu.**** (\[Action\<SearchItem>]\(https\://learn.microsoft.com/dotnet/api/system.action)): Handler that executes the action.

## SearchAction(string, string, Texture2D, string, Action\<SearchItem\[]>)

Default constructor to build a search action.

```csharp
public SearchAction(string providerId, string name, Texture2D icon, string tooltip, Action<SearchItem[]> handler)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The search provider ID that supports this action.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label name when displaying the action in the Action Menu.**** (\[Texture2D]\(/engine/6000.6/script-reference/unityengine/texture2d)): Icon for the action in the Action Menu.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Tooltip associated with the action when displayed in the Action Menu.**** (\[Action\<SearchItem\[]>]\(https\://learn.microsoft.com/dotnet/api/system.action)): Handler that executes the action.

## SearchAction(string, string, Texture2D, string, Action\<SearchItem>)

Default constructor to build a search action.

```csharp
public SearchAction(string providerId, string name, Texture2D icon, string tooltip, Action<SearchItem> handler)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The search provider ID that supports this action.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label name when displaying the action in the Action Menu.**** (\[Texture2D]\(/engine/6000.6/script-reference/unityengine/texture2d)): Icon for the action in the Action Menu.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Tooltip associated with the action when displayed in the Action Menu.**** (\[Action\<SearchItem>]\(https\://learn.microsoft.com/dotnet/api/system.action)): Handler that executes the action.

## SearchAction(string, string, Texture2D, string)

Default constructor to build a search action.

```csharp
public SearchAction(string providerId, string name, Texture2D icon = null, string tooltip = null)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The search provider ID that supports this action.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label name when displaying the action in the Action Menu.**** (\[Texture2D]\(/engine/6000.6/script-reference/unityengine/texture2d)): Icon for the action in the Action Menu.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Tooltip associated with the action when displayed in the Action Menu.
