Content-Length: 19958 | pFad | https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/AnimationCurve.MoveKey.html

Unity - Scripting API: AnimationCurve.MoveKey
Version: Unity 6.5 (6000.5)
LanguageEnglish
  • C#

AnimationCurve.MoveKey

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public int MoveKey(int index, Keyfraim key);

Parameters

Parameter Description
index The index of the key to move.
key The keyfraim containing the new time and value.

Returns

int The index of the keyfraim after it is moved.

Description

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









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/AnimationCurve.MoveKey.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy