Class SearchAction
Namespace: Unity.QuickSearch
Syntax
public class SearchAction
Constructors
SearchAction(String, GUIContent)
Default constructor to build a search action.
Declaration
public SearchAction(string type, GUIContent content)
Parameters
| Type | Name | Description |
|---|---|---|
| String | type | |
| GUIContent | content |
SearchAction(String, String, Texture2D, String)
Extended constructor to build a search action.
Declaration
public SearchAction(string type, string name, Texture2D icon = null, string tooltip = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | type | |
| String | name | |
| Texture2D | icon | |
| String | tooltip |
Fields
closeWindowAfterExecution
Indicates if the search view should be closed after the action execution.
Declaration
public bool closeWindowAfterExecution
Field Value
| Type | Description |
|---|---|
| Boolean |
handler
Called when an item is executed with this action
Declaration
public Action<SearchItem, SearchContext> handler
Field Value
| Type | Description |
|---|---|
| Action<SearchItem, SearchContext> |
isEnabled
Called before displaying the menu to see if an action is available for a given item.
Declaration
public Func<SearchItem, SearchContext, bool> isEnabled
Field Value
| Type | Description |
|---|---|
| Func<SearchItem, SearchContext, Boolean> |
kContextualMenuAction
Unique ID used for contextual action (i.e. to pop a contextual menu when the user right click on an item).
Declaration
public const string kContextualMenuAction = "context"
Field Value
| Type | Description |
|---|---|
| String |
Properties
DisplayName
Name used to display
Declaration
public string DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| String |
Id
Action unique identifier.
Declaration
public string Id { get; }
Property Value
| Type | Description |
|---|---|
| String |