I created a C++ class based on ASkeletalMeshActor, called MySkeletalMeshActor.
I then created a BluePrint based on this C++, called MySkeletalMeshActor_BP
In the C++ class, I have overridden the BeginPlay and Tick methods, without forgetting to call Super:: for each of these methods. For the moment, these methods are only supposed to log a message, allowing me to check everything is fine.
Result
Only the BeginPlay() log is visible in the console. The Tick() method doesn’t do anything.
MySkeletalMeshActor.h
#pragma once
#include "CoreMinimal.h"
#include "Animation/SkeletalMeshActor.h"
#include "MySkeletalMeshActor.generated.h"
UCLASS()
class UNNAMED_API AMySkeletalMeshActor : public ASkeletalMeshActor
{
GENERATED_BODY()
protected:
// Called when the game starts
virtual void BeginPlay() override;
virtual void Tick(float DeltaTime) override;
};
MySkeletalMeshActor.cpp
#include "MySkeletalMeshActor.h"
void AMySkeletalMeshActor::BeginPlay()
{
Super::BeginPlay();
UE_LOG(LogTemp, Warning, TEXT("Begin Play"));
}
void AMySkeletalMeshActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
UE_LOG(LogTemp, Warning, TEXT("Tick"));
}
In the BluePrint, Tick is enabled:
Anybody knows what is wrong with SkeletalMeshActor Tick() method ?
Thak you!