GetSceneObjectPreview
Returns a scene object preview to be used in the search view.
阅读时间1 分钟最后更新于 1 个月前
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. |