Manual     Reference     Scripting  
  
Scripting > Runtime Classes > Graphics   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Enumerations
  • History
  • Index
  • Graphics
  • All Members
  • Class Functions
  • Blit
  • BlitMultiTap
  • DrawMesh
  • DrawMeshNow
  • DrawTexture

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.