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

最后修改:2011年2月27日 Sunday 17:42

本脚本参考基于Unity 3.4.1f5

英文部分版权属©Unity公司所有,中文部分© Unity圣典 版权所有,未经许可,严禁转载 。