Hey all,
I’m having trouble getting C++ AnimNotifyState to work. All I’ve done is created a child class of UAnimNotifyState, overridden Received_NotifyTick, and try printing out whenever it is executed. In blueprints I got it to work right away, this is what the function looks like (yes, it is a different class from my C++ one):
Here is my header code:
#include "CoreMinimal.h"
#include "Animation/AnimNotifies/AnimNotifyState.h"
#include "AnimNotifyState_AnimationState.generated.h"
/**
*
*/
UCLASS()
class PROJECT_API UAnimNotifyState_AnimationState : public UAnimNotifyState
{
GENERATED_BODY()
virtual bool Received_NotifyTick(USkeletalMeshComponent * MeshComp, UAnimSequenceBase * Animation, float FrameDeltaTime) const;
};
Here is my source code:
#include "AnimNotifyState_AnimationState.h"
#include "Kismet/KismetSystemLibrary.h"
bool UAnimNotifyState_AnimationState::Received_NotifyTick(USkeletalMeshComponent * MeshComp, UAnimSequenceBase * Animation, float FrameDeltaTime) const
{
//Super::Received_NotifyTick(MeshComp, Animation, FrameDeltaTime);
UKismetSystemLibrary::PrintString(MeshComp, "works");
return false;
}
What could I be missing? It works fine in BP, and all I’m doing outside of the C++ code is literally replacing the same anim notify that I made in BP with the one I made in C++, so the issue is definitely in the code.
Thanks for any help!