x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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"));;
 }

Product Version: UE 4.9
Tags:
more ▼

asked Jan 11 '16 at 02:02 PM in C++ Programming

avatar image

Vahid
161 10 12 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Jan 11 '16 at 06:08 PM

avatar image

domzorg
714 50 56 128

avatar image Vahid Jan 11 '16 at 06:15 PM

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 ... !!!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

D.

more ▼

answered Jan 12 '16 at 08:07 AM

avatar image

domzorg
714 50 56 128

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question