Advertisement
orfeasel

Destroy after 5 seconds using TimerDelegate

Feb 10th, 2016
25,245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. FTimerHandle TimerHandle;
  2.  
  3. FTimerDelegate TimerDelegate;
  4. //Binding the TimerDelegate to the Destroy function
  5. TimerDelegate.BindUFunction(this, FName("Destroy"));
  6.  
  7. //Will call the bound function of the TimerDelegate after 5 seconds
  8. GetWorld()->GetTimerManager().SetTimer(TimerHandle, TimerDelegate, 5.f, false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement