Код:
public :
//============================================ Anim Sequence Functions ============================================
// Return Sequence Length in seconds
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Sequence Length"))
static void GetAnimSequenceLength(const UAnimSequence* AnimSequence, float& AnimationLength);
// Return Sequence Length in Frames
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Sequence Frames Length"))
static void GetAnimSequenceFramesLength(const UAnimSequence* AnimSequence, int32& AnimationLength);
// Return Sequence Rate Scale
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Sequence Rate Scale"))
static void GetAnimSequenceRateScale(const UAnimSequence* AnimSequence, float& RateScale);
// Set Sequence Rate Scale
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Set Animation Sequence Rate Scale"))
static void SetAnimSequenceRateScale(UAnimSequence* AnimSequence, float RateScale);
// Return Anim Sequence Notify's Names List
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Sequence Notify's Names List"))
static void GetAnimSequenceNotifyNamesList(const UAnimSequence* AnimSequence, TArray<FString>& NotifyList);
// Return Anim Sequence Notify Start Frame By Name ,return -1 if no result
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Sequence Notify Frame By Name"))
static void GetAnimSequenceNotifyFrameByName(const UAnimSequence* AnimSequence, const FString NotifyName, int32& NotifyFrame);
// Return Anim Sequence Notify Start Time By Name ,return -1 if no result
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Sequence Notify Time By Name"))
static void GetAnimSequenceNotifyTimeByName(const UAnimSequence* AnimSequence, const FString NotifyName, float& NotifyTime);
//============================================ Anim Montage Functions ============================================
// Return Anim Montage Length in seconds
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Montage Length"))
static void GetAnimMontageLength(const UAnimMontage* AnimMontage, float& AnimationLength);
// Return Montage Length in Frames
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Montage Frames Length"))
static void GetAnimMontageFramesLength(const UAnimMontage* AnimMontage, int32& AnimationLength);
// Return Montage Rate Scale
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Montage Rate Scale"))
static void GetAnimMontageRateScale(const UAnimMontage* AnimMontage, float& RateScale);
// Return Anim Montage Notify's Names List
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Montage Notify's Names List"))
static void GetAnimMontageNotifyNamesList(const UAnimMontage* AnimMontage, TArray<FString>& NotifyList);
// Return Anim Montage Notify Start Frame By Name ,return -1 if no result
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Montage Notify Frame By Name"))
static void GetAnimMontageNotifyFrameByName(const UAnimMontage* AnimMontage, const FString NotifyName, int32& NotifyFrame);
// Return Anim Montage Notify Start Time By Name ,return -1 if no result
UFUNCTION(BlueprintCallable, Category = "Animation", Meta = (DisplayName = "Get Animation Montage Notify Time By Name"))
static void GetAnimMontageNotifyTimeByName(const UAnimMontage* AnimMontage, const FString NotifyName, float& NotifyTime);