Version: 5.3 (switch to 5.4b)
IdiomaEnglish
  • C#
  • JS

Idioma de script

Selecciona tu lenguaje de programación favorito. Todos los fragmentos de código serán mostrados en este lenguaje.

Gizmos.DrawGUITexture

Sugiere un cambio

¡Éxito!

Gracias por ayudarnos a mejorar la calidad de la documentación de Unity. A pesar de que no podemos aceptar todas las sugerencias, leemos cada cambio propuesto por nuestros usuarios y actualizaremos los que sean aplicables.

Cerrar

No se puedo enviar

Por alguna razón su cambio sugerido no pudo ser enviado. Por favor <a>intente nuevamente</a> en unos minutos. Gracias por tomarse un tiempo para ayudarnos a mejorar la calidad de la documentación de Unity.

Cerrar

Cancelar

Cambiar al Manual
public static function DrawGUITexture(screenRect: Rect, texture: Texture, mat: Material = null): void;
public static void DrawGUITexture(Rect screenRect, Texture texture, Material mat = null);
public static function DrawGUITexture(screenRect: Rect, texture: Texture, mat: Material = null): void;
public static void DrawGUITexture(Rect screenRect, Texture texture, Material mat = null);
public static function DrawGUITexture(screenRect: Rect, texture: Texture, leftBorder: int, rightBorder: int, topBorder: int, bottomBorder: int, mat: Material = null): void;
public static void DrawGUITexture(Rect screenRect, Texture texture, int leftBorder, int rightBorder, int topBorder, int bottomBorder, Material mat = null);
public static function DrawGUITexture(screenRect: Rect, texture: Texture, leftBorder: int, rightBorder: int, topBorder: int, bottomBorder: int, mat: Material = null): void;
public static void DrawGUITexture(Rect screenRect, Texture texture, int leftBorder, int rightBorder, int topBorder, int bottomBorder, Material mat = null);

Parámetros

screenRect The size and position of the texture on the "screen" defined by the XY plane.
texture The texture to be displayed.
mat An optional material to apply the texture.
leftBorder Inset from the rectangle's left edge.
rightBorder Inset from the rectangle's right edge.
topBorder Inset from the rectangle's top edge.
bottomBorder Inset from the rectangle's bottom edge.

Descripción

Pintar una textura en la escena.

The chosen texture is drawn in 3D space on a "screen" defined by the XY plane (ie, the plane where the Z coordinate is zero). The values of the texture rectangle are given in scene units. The optional border values specify an inset from each edge within the rectangle in scene units; the texture is drawn inside the inset rectangle and the edge pixels are repeated outwards. This is a useful quick way to create a large background region around the main texture when its edges are of a single colour.

This function can be useful for creating GUI backgrounds in conjunction with a camera pointing directly at the texture.

	var myTexture : Texture;

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