SetTextureOffset:
function SetTextureOffset (propertyName : String, offset : Vector2) : void
Establece el lugar de desplazamiento de la textura pasada como primer parámetro.
GetTextureOffset:
function GetTextureOffset (propertyName : String) : Vector2
Obtiene la ubicación del desplazamiento de la textura pasada como parámetro.
SetTextureScale:
function SetTextureScale (propertyName : String, scale : Vector2) : void
Establece la escala de la textura pasada como primer parámetro.
GetTextureScale:
function GetTextureScale (propertyName : String) : Vector2
Obtiene la escala de la textura pasada como parámetro.
SetFloat:
function SetFloat (propertyName : String, value : float) : void
Establece un valor tipo float con nombre.
GetFloat:
function GetFloat (propertyName : String) : float
Obtiene un valor de tipo float con nombre.
HasProperty:
function HasProperty (propertyName : String) : boolean
Comprueba si el shader del material tiene una propiedad con un nombre determinado.
Por ejemplo:
if(renderer.material.HasProperty("_Color"))
renderer.material.SetColor("_Color",Color.red);
GetTag:
function GetTag (tag : String, searchFallbacks : boolean, defaultValue : String = "") : String
Obtiene el valor del tag del shader del material. Si el shader del material no tiene definido el tag, devuelve defaultValue. Si el parámetro searchFallbacks es true, entonces esta función buscará el tag en todos los subshaders. Si searchFallbacks es falso entonces sólo se hará la consulta para el actual subshader.
Lerp:
function Lerp (start : Material, end : Material, t : float) : void
Interpola propiedades entre dos materiales. Hace que todos los colores y valores del primer material sean convertidos en los valores del segundo material en el tiempo t. Cuanto el tercer parámetro (t) es cero, se toman los valores de start; cuando es 1, los valores se toman de end.
CopyPropertiesFromMaterial:
function CopyPropertiesFromMaterial (mat : Material) : void
Copia propiedades de otro material en este material.
No hay comentarios:
Publicar un comentario