.h
UFUNCTION()
void PrintLog(int n);
.cpp
FTimerHandle handler;
FTimerDelegate TimerDel;
TimerDel.BindUFunction(this, TEXT("PrintLog"), 5);
//这里是用来绑定假如函数没有为UFUNCTION
//TimerDel.BindUObject(this, &AUsableActorCharacter::PrintLog, 5);
GetWorld()->GetTimerManager().SetTimer(handler, TimerDel, 2, true);
UE4 SetTimer传递参数到回调中
猜你喜欢
转载自blog.csdn.net/maxiaosheng521/article/details/97260776
今日推荐
周排行