Graphics.DrawTexturestatic function DrawTexture (screenRect : Rect, texture : Texture, leftBorder : int, rightBorder : int, topBorder : int, bottomBorder : int, mat : Material = null) : voidstatic function DrawTexture (screenRect : Rect, texture : Texture, sourceRect : Rect, leftBorder : int, rightBorder : int, topBorder : int, bottomBorder : int, mat : Material = null) : voidstatic function DrawTexture (screenRect : Rect, texture : Texture, sourceRect : Rect, leftBorder : int, rightBorder : int, topBorder : int, bottomBorder : int, color : Color, mat : Material = null) : voidParameters
DescriptionDraw 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.
JavaScript
// Draws a texture on the screen at 10, 10 with 100 width, 100 height. using UnityEngine; import UnityEngine
|
