Draw a texture in screen coordinates. Useful for GUI backgrounds.
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)