Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RenderStaticPreview(string, Object[], int, int)

Draws the default Terrain Layer static preview.
Read time 1 minuteLast updated 9 hours ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public override Texture2D RenderStaticPreview(string assetPath, Object[] subAssets, int width, int height)

Parameters

assetPath

The project-relative path of the asset to operate on.

subAssets

An array of all assets at assetPath.

width

Width of the created texture in pixels.

height

Height of the created texture in pixels.

Returns

Type

Description

Texture2DThe generated static preview
Texture2D
of the Terrain Layer, or
null
if Unity uses the default icon.

Remarks

Additional Resources: Editor.RenderStaticPreview.