Announcement

Collapse
No announcement yet.

Tickgroups?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tickgroups?

    I am just starting out with the UE4, coming from Unity.
    So in Unity you had various events that fired for each GameObject (equivalent to the actor) such as "Update" (every frame), "FixedUpdate" (for physics), "OnPreRender" ETC.

    Completely with C++...
    UE4s equivalent for actors appears to be setting bCanEverTick to true in the actor constructor and using "AActor::SetTickGroup". Then, the actors Tick function is called according to the tick group.
    So how do I tick using multiple groups for one actor? E.G I need a tick on frame, just before the physics are updated and just before the frame is rendered (that last one isn't even in the tick group).

    Am I going about this the wrong way? (Keeping in mind I want to do it in code specifically).

    #2
    You can add additional FTickFunctions to your actor and schedule them in to different tick groups if you really need to be processing your objects multiple times per frame, that said, we generally try to minimize the number of tick functions that need to be executed in a frame, so you may want to look at what you're wanting to do in each of those ticks and think about ways to avoid revisiting actors repeatedly.

    Comment

    Working...
    X