GetSceneObjectPreview
Returns a scene object preview to be used in the search view.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Method
- Namespace: UnityEditor.Search
- Assembly: UnityEditor
GetSceneObjectPreview(GameObject, Vector2, FetchPreviewOptions, Texture2D)
Returns a scene object preview to be used in the search view.
public static Texture2D GetSceneObjectPreview(GameObject obj, Vector2 size, FetchPreviewOptions options, Texture2D thumbnail)
Parameters
Scene object instance.
Preview size.
Preview options.
Any existing thumbnail in case we cannot obtain a scene object preview.
Returns
Type | Description |
|---|---|
| Texture2D | Object preview or thumbnail fallback. |
Remarks
GetSceneObjectPreview(SearchContext, GameObject, Vector2, FetchPreviewOptions, Texture2D)
Returns a scene object preview to be used in the search view.
public static Texture2D GetSceneObjectPreview(SearchContext ctx, GameObject obj, Vector2 size, FetchPreviewOptions options, Texture2D thumbnail)
Parameters
Scene object instance.
Preview size.
Preview options.
Any existing thumbnail in case we cannot obtain a scene object preview.
Returns
Type | Description |
|---|---|
| Texture2D | Object preview or thumbnail fallback. |