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.

AnimationCurve.AddKey

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 AddKey(time: float, value: float): int;
public int AddKey(float time, float value);

Parámetros

time The time at which to add the key (horizontal axis in the curve graph).
value The value for the key (vertical axis in the curve graph).

Valor de retorno

int The index of the added key, or -1 if the key could not be added.

Descripción

Añadir una nueva clave a la curva.

Smooth tangents are automatically computed for the key. Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

See Also: keys variable.


public function AddKey(key: Keyframe): int;
public int AddKey(Keyframe key);

Parámetros

key Añadir una nueva clave a la curva.

Valor de retorno

int The index of the added key, or -1 if the key could not be added.

Descripción

Añadir una nueva clave a la curva.

Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

See Also: keys variable, Keyframe struct.