绘制贴图
在C#编写的脚本中,在屏幕中绘制一张静态贴图
,需要使用GUI.DrawTexture()方法,重载方法很多,输入参数可以在写代码时候多看下定义;参数最全的方法的原型为:
public static void DrawTexture(Rect position, Texture image, ScaleMode
scaleMode, bool alphaBlend);
//
// 摘要:
// Draw a texture within a rectangle.
//
// 参数:
// 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.
//
// alphaBlend:
// Whether to apply alpha blending when drawing the image (enabled by default).
//
// imageAspect:
// Aspect ratio to use for the source image. If 0 (the default), the aspect
// ratio from the image is used. Pass in w/h for the desir