RealDocs

FTimerManager::SetTimerForNextTick

function Engine Since 4.0
#include "TimerManager.h"
Access: public Specifiers: inline

Description

Schedules a callback to fire exactly once at the start of the next frame's timer tick. Useful for deferring logic that is unsafe to execute mid-tick.

Signature

template<class UserClass> FTimerHandle SetTimerForNextTick( UserClass* inObj, void (UserClass::*inTimerMethod)() )

Parameters

Name Type Description Default
inObj UserClass* The object whose method will be called.
inTimerMethod void (UserClass::*)() The member function to call on the next tick.

Return Type

FTimerHandle

Caveats & Gotchas

  • Unlike SetTimer, this returns the FTimerHandle by value rather than through an out-parameter — store the return if you may need to cancel it.
  • Overloads exist for FTimerDelegate, FTimerDynamicDelegate, and TFunction<void()>.
  • Common uses: deferring actor spawns or destructions triggered from within an overlap event, or breaking circular update dependencies between systems.

Example

Defer an action to the next frame C++
GetWorldTimerManager().SetTimerForNextTick(
	this,
	&AMyActor::SafeCleanup
);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.