Graphics.DrawTexture 绘制纹理

static function DrawTexture (screenRect : Rect, texture : Texture, mat : Material = null) : void
static function DrawTexture (screenRect : Rect, texture : Texture, leftBorder : int, rightBorder : int, topBorder : int, bottomBorder : int, mat : Material = null) : void
static function DrawTexture (screenRect : Rect, texture : Texture, sourceRect : Rect, leftBorder : int, rightBorder : int, topBorder : int, bottomBorder : int, mat : Material = null) : void
static function DrawTexture (screenRect : Rect, texture : Texture, sourceRect : Rect, leftBorder : int, rightBorder : int, topBorder : int, bottomBorder : int, color : Color, mat : Material = null) : void

Description描述

Draw a texture in screen coordinates.

在屏幕坐标下绘制一个纹理。

If you want to draw a texture from inside of OnGUI code, you should only do that from EventType.Repaint events. It's probably better to use GUI.DrawTexture for GUI code.

如果你想在OnGUI代码中绘制一个纹理,可以从EventType.Repaint事件做到这点,这可能更好的从GUI代码使用GUI.DrawTexture

Page last updated: 2011-2-27