編輯

共用方式為


AnimationCurveExtensions.Duration(AnimationCurve) Method

Definition

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.

Applies to