UTimelineComponent problem

Hello guys,

I’m using 4.9.1 version and i have a problem with that…
I have two project one of them created before in two or three month ago.

In older one these lines of codes work perfect and I can get “Playing” in my log. but in newer project it doesn’t work and always false just one tick is true!!

in . h file

UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly)
UTimelineComponent* MyTimeline;

in .cpp file

MyActor::MyActor()
{
	MyTimeline = CreateDefaultSubobject<UTimelineComponent>(TEXT("MyTimeline"));
	MyTimeline->SetTimelineLength(2.f);
	MyTimeline->SetPlayRate(1.f);
	MyTimeline->Activate(false);
}

void MyActor::BeginPlay()
{
	Super::BeginPlay();
	MyTimeline->PlayFromStart();
}

void MyActor::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );

	if (MyTimeline->IsPlaying())
		UE_LOG(LogTemp, Warning, TEXT("Playing"));;
}

Hello,

I’ve posted this question
link text

I don’t know if it will help. But you have to tick the timeline. The timeline object you’ve created will never tick by itself.

D.

Thanks for your answer …

Why it’s working in another project … that timeline just played one time in Begin play and every tick i got that log … !!!

Good remark. I have no idea since for me it was never ticking.
Someone should have the answer.

D.