Gizmos.DrawGUITexture 绘制界面纹理
static function DrawGUITexture (screenRect : Rect, texture : Texture, mat : Material = null) : void
static function DrawGUITexture (screenRect : Rect, texture : Texture, leftBorder : int, rightBorder : int, topBorder : int, bottomBorder : int, mat : Material = null) : void
Description描述
Draw a texture in screen coordinates. Useful for GUI backgrounds.
在屏幕坐标绘制一个纹理。作为GUI的背景很有用的。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public Texture myTexture;
void OnDrawGizmos() {
Gizmos.DrawGUITexture(new Rect(10, 10, 20, 20), myTexture);
}
}
最后修改:2010年12月26日 Sunday 0:26