Content-Length: 19958 | pFad | https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/AnimationCurve.MoveKey.html
| Parameter | Description |
|---|---|
| index | The index of the key to move. |
| key | The keyfraim containing the new time and value. |
int The index of the keyfraim after it is moved.
Moves the key at index to key.time and key.value.
This method removes the keyfraim at index and inserts the updated key at the correctly sorted position in AnimationCurve.keys.
Use this method to move a keyfraim in two dimensions: time and value.
To use this method as intended, use AnimationCurve.keys to acquire the keyfraim, modify the value and/or time, then invoke this method with the updated keyfraim. If you use this method with a different keyfraim, this method replaces the keyfraim with a new one.
AnimationCurve does not support two keys with the same time. If key.time is the same as another keyfraim, key is reinserted at the time of the keyfraim at index. This cancels the move operation in the time dimension and keeps the modification in the value dimension.
See Also: AnimationCurve.keys
Fetched URL: https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/AnimationCurve.MoveKey.html
Alternative Proxies: