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"

Tick is never called, even though bCanEverTick is set to true.

Here's the code:

TestActor.h:

 UCLASS()
 class ATestActor : public AActor
 {
     GENERATED_UCLASS_BODY()
 
     virtual void Tick(float DeltaTime) override;
     
 };

TestActor.cpp:

 ATestActor::ATestActor(const class FPostConstructInitializeProperties& PCIP)
     : Super(PCIP)
 {
     PrimaryActorTick.bCanEverTick = true;
 }
 
 void ATestActor::Tick(float DeltaTime)
 {
     Super::Tick(DeltaTime);
 
     if (GEngine)
     {
         GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Yellow, TEXT("Tick"));
     }
 }

The "Tick"-text is never displayed on the screen, which would mean that the Tick()-function never gets called. Why? I enabled bCanEverTick and it's still not ticking...

Product Version: Not Selected
Tags:
more ▼

asked Jun 25 '14 at 08:12 PM in C++ Programming

avatar image

Whoosy
21 1 2 5

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

1 answer: sort voted first

You also need to add:

 PrimaryActorTick.bStartWithTickEnabled = true;
 PrimaryActorTick.bAllowTickOnDedicatedServer = true;

You can omit the second one if you don't want actor to tick on server.

more ▼

answered Jun 25 '14 at 08:46 PM

avatar image

iniside
1.4k 89 84 171

avatar image Whoosy Jun 25 '14 at 08:55 PM

Thanks! This worked!

avatar image Shepherd Dec 06 '14 at 06:56 AM

Thanks! This is a life saver! was about to pull my hair out lol.

(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