Hi,
I posted this question yesterday in the AnswerHub, but it didn’t get any attention and now it’s already gone so deep in the list that it won’t get any more attention. But I’m still stuck with that problem! I could use some help or advice on this.
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
1. #pragma once
1. #include "CoreMinimal.h"
1. #include "Animation/SkeletalMeshActor.h"
1. #include "MySkeletalMeshActor.generated.h"
1. UCLASS()
1. class UNNAMED_API AMySkeletalMeshActor : public ASkeletalMeshActor
1. {
1. GENERATED_BODY()
1. protected:
1. // Called when the game starts
1. virtual void BeginPlay() override;
1. virtual void Tick(float DeltaTime) override;
1. };
MySkeletalMeshActor.cpp
1. #include "MySkeletalMeshActor.h"
1. void AMySkeletalMeshActor::BeginPlay()
1. {
1. Super::BeginPlay();
1. UE_LOG(LogTemp, Warning, TEXT("Begin Play"));
1. }
1. void AMySkeletalMeshActor::Tick(float DeltaTime)
1. {
1. Super::Tick(DeltaTime);
1. UE_LOG(LogTemp, Warning, TEXT("Tick"));
1. }
In the BluePrint, Tick is enabled:
Anybody knows what is wrong with SkeletalMeshActor Tick() method ?
Thak you!