Version: 5.4

Texture2D

class in UnityEngine

/

Hereda de:Texture

Cambiar al Manual

Descripción

Class for texture handling.

Use this to create textures on the fly or to modify existing texture assets.

Variables Estáticas

blackTextureGet a small texture with all black pixels.
whiteTextureGet a small texture with all white pixels.

Variables

formatEl formato de los datos de pixel en la textura (Lectura solamente).
mipmapCountCuántos niveles de mipmap hay en esta textura (Lectura solamente)?

Constructores

Texture2DCrear una nueva textura vacía.

Funciones Públicas

ApplyRealmente aplica todos los cambios SetPixel y SetPixels previos.
CompressComprimir la textura en formato DXT.
EncodeToJPGCodifica la textura en formato JPG.
EncodeToPNGCodifica la textura en formato PNG.
GetPixelDevuelve el color del píxel en las coordenadas (x, y).
GetPixelBilinearReturns filtered pixel color at normalized coordinates (u, v).
GetPixelsGet the pixel colors from the texture.
GetPixels32Get a block of pixel colors in Color32 format.
GetRawTextureDataGet raw data from a texture.
LoadImageCarga una imagen de un array de bytes.
LoadRawTextureDataFills texture pixels with raw preformatted data.
PackTexturesEmpaqueta múltiples texturas en una textura atlas.
ReadPixelsRead pixels from screen into the saved texture data.
ResizeResizes the texture.
SetPixelSets pixel color at coordinates (x,y).
SetPixelsSet a block of pixel colors.
SetPixels32Set a block of pixel colors.
UpdateExternalTextureUpdates Unity texture to use different native texture object.

Funciones Estáticas

CreateExternalTextureCreates Unity Texture out of externally created native texture object.

Miembros heredados

Variables

hideFlags¿Debería el objeto estar oculto, guardado con la escena o modificable por el usuario?
nameEl nombre del objeto.
anisoLevelNivel de filtrado anisotrópico de la textura.
dimensionDimensionalidad (tipo) de la textura (lectura solamente).
filterModeModo de filtrado de la textura.
heightAltura de la textura en pixels. (Read Only)
mipMapBiasMip map bias de la textura.
widthAnchura de la textura en píxeles. (Read Only)
wrapModeModo wrap (Repeat o Clamp) de la textura.

Funciones Públicas

GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringDevuelve el nombre del objeto.
GetNativeTexturePtrRecupere un puntero nativo (API de gráficos subyacente) al recurso de textura.

Funciones Estáticas

DestroyElimina un gameobject, componente o asset.
DestroyImmediateDestruye el objeto obj inmediatamente.
DontDestroyOnLoadHace que el objeto target no sea destruido automáticamente cuando se cargue una nueva escena.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeDevuelve una lista de todos los objetos activos cargados de tipo type.
InstantiateDevuelve una copia del objeto original.
SetGlobalAnisotropicFilteringLimitsEstablece límites anisotrópicos.

Operadores

bool¿Existe el objeto?
operator !=Compare si dos objetos se refieren a un objeto diferente.
operator ==Compara dos referencias de objeto para ver si se refieren al mismo objeto.