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.

IAnimatorControllerPlayable.CrossFade

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 function CrossFade(stateName: string, transitionDuration: float, layer: int, normalizedTime: float): void;
public void CrossFade(string stateName, float transitionDuration, int layer, float normalizedTime);
public function CrossFade(stateNameHash: int, transitionDuration: float, layer: int, normalizedTime: float): void;
public void CrossFade(int stateNameHash, float transitionDuration, int layer, float normalizedTime);

Parámetros

stateName The name of the destination state.
transitionDuration The duration of the transition. Value is in source state normalized time.
layer Layer index containing the destination state. If no layer is specified or layer is -1, the first state that is found with the given name or hash will be played.
normalizedTime Start time of the current destination state. Value is in source state normalized time, should be between 0 and 1. If no explicit normalizedTime is specified or normalizedTime value is float.NegativeInfinity, the state will either be played from the start if it's not already playing, or will continue playing from its current time and no transition will happen.
stateNameHash The AnimatorState fullPathHash, nameHash or shortNameHash to play. Passing 0 will transition to self.

Descripción

Creates a dynamic transition between the current state and the destination state.

Both states have to be on the same layer.

You cannot change the current state on a synchronized layer, you need to change it on the referenced layer.