AnimationCurveExtensions.Duration(AnimationCurve) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the absolute duration of the curve from first to last key frame
public:
[System::Runtime::CompilerServices::Extension]
static float Duration(UnityEngine::AnimationCurve ^ curve);
public static float Duration (this UnityEngine.AnimationCurve curve);
static member Duration : UnityEngine.AnimationCurve -> single
<Extension()>
Public Function Duration (curve As AnimationCurve) As Single
Parameters
- curve
- UnityEngine.AnimationCurve
The animation curve to check duration of.
Returns
Returns 0 if the curve is null or has less than 1 frame, otherwise returns time difference between first and last frame.