Version: 2018.2
public static void DrawPreviewTexture (Rect position, Texture image, Material mat= null, ScaleMode scaleMode= ScaleMode.StretchToFill, float imageAspect= 0, float mipLevel= -1);

パラメーター

positionテクスチャを描画するスクリーン上の Rect
image表示する Texture
matテクスチャを描画するときに使用するマテリアル
scaleMode描画されるものでアスペクト比が合わないときに画像をどのようにスケーリングするか
imageAspectソースのイメージに使用するアスペクト比。 0 (デフォルト)の場合はイメージの持つ縦横比が使用されます。
mipLevelThe mip-level to sample. If negative, the texture is sampled normally. Sets material _Mip property.

説明

矩形内にテクスチャを描画します。

If mat is null (the default), an appropriate material will be chosen for a RGBM or doubleLDR lightmap or a normal map and the fallback blit material will be chosen otherwise.


Preview Texture in an Editor Window.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961