You should be able to call PrimaryActor.bCanEverTick in the constructor. Is that set to true?
Also, in your new actor, are you properly overriding the Tick() method and calling Super::Tick()? If you override the Tick from the parent and yet didn’t call the super, then the parent actor can’t send the tick event back to you, so make sure to check that as well.
My Mate and me created a new actor which will generate our World later on.
Now we noticed a problem that our actor does not execute the Tick function.(Does not print our message into the OutputLog)
We enabled Tick for this Actor inside the constructor o.O
Is there anything else we should check(We are both new to UE)?
If you’re doing this in C++, then in your actor’s constructor, you must have this two enabled:
PrimaryActorTick.bCanEverTick = true;
PrimaryActorTick.bStartWithTickEnabled = true;
If this is a BP class or you’ve created a BP based on this c++ class, you must make sure that the same settings are also enabled in your blueprints. Open your BP, on the right panel, under Actor Tick, make sure Start With Tick Enabled is checked.
Hope this helps.
We called Super::Tick() and set CanEverTick and StartWithTickEnabled to true inside the constructor.
And yet it doesn’t tick? Did you check the blueprint too? Can post your code here?
looking at other comment’s the cpp file looks ok, could you share the .h file ? ( maybe you forgot the overrride keyword on your tick function declaration ? sounds odd, but can happen and should generate a warning )
could you put a log message on the constructor and begin play methods and check if it’s printed ?
Hmm… I don’t see any issues with your code. Did you put this Actor in the level? It will not tick if it’s not even constructed!
If this isn’t the case either, then try closing the editor and rebuilding your VS solution. It can be a compiler hiccup for no good reason!
the override keyword is on its place. there is no compiler warning, the actor is also placed in the scene and we gave it a static mesh as well.
I put a Log Message into the BeginPlac and its working as intended