AnimInstance set to SkeletonMesh of AActor not call NativeUpdateAnimation, but Pawn do this

i have a SkeletonMeshComponent with same Animation Blueprint, if i create it as a child to an AActor BP, the NativeUpdateAnimation will only be called once, but if i create it as a child to an APawn BP, it will work properly, called every frame or so.

i do not want to create a APawn for a static box, but if i create a box as An Actor, the AnimationBlueprint will not work. but it will cause some waste of calculation for inputs if a create it as a Pawn.

am i doing sth wrong? no special operation.

sorry, my bad.

i do not call Super::BeginPlay and Super::EndPlay in the custom class, thus the object is not prepared.

void AX2Box::BeginPlay()
{
	Super::BeginPlay();

	if (UX2GameInstance* GameInstance = GetGameInstance<UX2GameInstance>())
	{
		GameInstance->InteractRequest.AddDynamic(this, &AX2Box::OnInteract);
	}
}

void AX2Box::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
	Super::EndPlay(EndPlayReason);

	if (UX2GameInstance* GameInstance = GetGameInstance<UX2GameInstance>())
	{
		GameInstance->InteractRequest.RemoveDynamic(this, &AX2Box::OnInteract);
	}
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.