Material

class in UnityEngine

/

Hereda de:Object

Cambiar al Manual

Descripción

La clase material.

This class exposes all properties from a material, allowing you to animate them. You can also use it to set custom shader properties that can't be accessed through the inspector (e.g. matrices).

Con el fin de que el material sea utilizado por un objeto, utilice la propiedad Renderer.material.

See Also: Materials, Shaders.

Variables

colorEl color principal del material.
doubleSidedGIGets and sets whether the Double Sided Global Illumination setting is enabled for this material.
enableInstancingGets and sets whether GPU instancing is enabled for this material.
globalIlluminationFlagsDefine cómo el material debería interactuar con los lightmaps y lightprobes.
mainTextureLa textura del material.
mainTextureOffsetEl desfase de la textura de la textura principal.
mainTextureScaleLa escala de la textura de la textura principal.
passCountCuántos passes hay en este material (Lectura solamente).
renderQueueRender queue (cola de renderización) de este material.
shaderThe shader used by the material.
shaderKeywordsPalabras claves adicionales establecidas pro este material.

Constructores

Material

Funciones Públicas

CopyPropertiesFromMaterialCopy properties from other material into this material.
DisableKeywordUnset a shader keyword.
EnableKeywordSets a shader keyword that is enabled by this material.
FindPassReturns the index of the pass passName.
GetColorObtiene un valor de color nombrado.
GetColorArrayGet a named color array.
GetFloatObtiene un valor float nombrado.
GetFloatArrayGet a named float array.
GetIntObtiene un valor entero nombrado.
GetMatrixObtiene un valor matriz nombrado del shader.
GetMatrixArrayGet a named matrix array.
GetPassNameReturns the name of the shader pass at index pass.
GetShaderPassEnabledChecks whether a given Shader pass is enabled on this Material.
GetTagObtiene el valor de la etiqueta shader de un material.
GetTextureObtiene una textura nombrada.
GetTextureOffsetObtiene el desplazamiento de ubicación del propertyName de la textura.
GetTexturePropertyNameIDsReturn the name IDs of all texture properties exposed on this material.
GetTexturePropertyNamesReturns the names of all texture properties exposed on this material.
GetTextureScaleObtiene la escala de posicionamiento del propertyName de la textura.
GetVectorObtiene un valor de vector nombrado.
GetVectorArrayGet a named vector array.
HasPropertyRevisa si el shader del material tiene una propiedad de un nombre dado.
IsKeywordEnabledIs the shader keyword enabled on this material?
LerpInterpola las propiedades entre dos materiales.
SetBufferSets a named ComputeBuffer value.
SetColorSets a named color value.
SetColorArraySets a color array property.
SetFloatSets a named float value.
SetFloatArraySets a float array property.
SetIntSets a named integer value.
SetMatrixSets a named matrix for the shader.
SetMatrixArraySets a matrix array property.
SetOverrideTagEstablece una tag/valor para anular en el material.
SetPassActivate the given pass for rendering.
SetShaderPassEnabledEnables or disables a Shader pass on a per-Material level.
SetTextureSets a named texture.
SetTextureOffsetEstablece el desplazamiento de ubicación del propertyName de la textura.
SetTextureScaleEstablece la escala de posicionamiento del propertyName de la textura.
SetVectorSets a named vector value.
SetVectorArraySets a vector array property.

Miembros heredados

Variables

hideFlagsShould the object be hidden, saved with the Scene or modifiable by the user?
nameEl nombre del objeto.

Funciones Públicas

GetInstanceIDDevuelve el id de la instancia del objeto.
ToStringReturns the name of the GameObject.

Funciones Estáticas

DestroyElimina un gameobject, componente o asset.
DestroyImmediateDestroys the object obj immediately. You are strongly recommended to use Destroy instead.
DontDestroyOnLoadDo not destroy the target Object when loading a new Scene.
FindObjectOfTypeDevuelve el primer objeto activo cargado de tipo type.
FindObjectsOfTypeDevuelve una lista de todos los objetos activos cargados de tipo type.
InstantiateClona el objeto original y devuelve el clon.

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.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961