# GetThumbnail(SearchContext, bool)

> Gets the search item thumbnail if available, otherwise the thumbnail is fetched at this time. The thumbnail is usually used in list view compared to the grid view.

## Definition

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

```csharp
public Texture2D GetThumbnail(SearchContext context, bool cacheThumbnail = false)
```

### Parameters

**** (\[SearchContext]\(/engine/6000.3/script-reference/unityeditor/search/searchcontext)): Search context used to fetch the search item thumbnail.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Indicates if the search item thumbnail should be cached for next time.

### Returns

| Type                                                                  | Description                         |
| --------------------------------------------------------------------- | ----------------------------------- |
| [Texture2D](/engine/6000.3/script-reference/unityengine/texture2d.md) | Returns the search item 2D texture. |
