Gizmos.DrawGUITexture Manual     Reference     Scripting  
Scripting > Runtime Classes > Gizmos
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.

JavaScripts
var myTexture : Texture;

function OnDrawGizmos () {
Gizmos.DrawGUITexture(Rect(10, 10, 20, 20), myTexture);
}

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
public Texture myTexture;
void OnDrawGizmos() {
Gizmos.DrawGUITexture(new Rect(10, 10, 20, 20), myTexture);
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

public myTexture as Texture

def OnDrawGizmos():
Gizmos.DrawGUITexture(Rect(10, 10, 20, 20), myTexture)