UE4笔记---自定义间隔的定时器
.h 中定义
FTimerHandle TH_VisibilityMessage;
.cpp
#include "Engine.h"
GWorld->GetTimerManager().SetTimer(TH_VisibilityMessage, this, &UUMGTipMessage::OnTimerHandleEvent, 5, false);
// 参数描述
/**
* Sets a timer to call the given native function at a set interval. If a timer is already set
* for this delegate, it will update the current timer to the new parameters and reset its
* elapsed time to 0.
*
* @param InOutHandle Handle to identify this timer. If it is invalid when passed in it will be made into a valid handle.
* @param InObj Object to call the timer function on.
* @param InTimerMethod Method to call when timer fires.
* @param InRate The amount of time between set and firing. If <= 0.f, clears existing timers.
* @param InbLoop true to keep firing at Rate i
UE4笔记---自定义间隔的定时器
于 2017-08-27 16:05:22 首次发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)