EditorGUI.DrawPreviewTexture 绘制预览纹理
static function DrawPreviewTexture (position : Rect, image : Texture, mat : Material = null, scaleMode : ScaleMode = ScaleMode.StretchToFill, imageAspect : float = 0) : void
Parameters参数
position
Rectangle on the screen to draw the texture within.
屏幕上绘制纹理的矩形区域
image
Texture to display. // 显示的纹理
-
scaleMode
How to scale the image when the aspect ratio of it doesn't fit the aspect ratio to be drawn within.
当纹理的尺寸不适合这个区域时如何缩放
-
mat
Material to be used when drawing the texture.
当绘制纹理时使用的材质
-
imageAspect
Aspect ratio to use for the source image. If 0 (the default), the aspect ratio from the image is used.
用于源图片的纵横比。如果为0(默认),使用源图片的纵横比
Description描述
Draws the texture within a rectangle.
在矩形内绘制纹理。
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.
如果mat为空(默认),一个适当的材料将被选择为RGBM或doubleLDR