Download

Timer doesn't fire for PIE (Bug?)

I have a timer which fires for all clients except for the client that runs in the PIE window. Is this a bug or am I doing something wrong?

void UMyActorComponent::InitializeComponent()
{
Super::InitializeComponent();
GetWorld()->GetTimerManager().SetTimer(WaitForGameStateHandle, this, &MyActorComponent::TryInit, /InRate/0.2f, /bLoop/true);
}

Does it fire from a different method, like BeginPlay?

Will give it a try, thanks for suggestion

It still does not work in BeginPlay :frowning:

Is your TryInit function marked as UFUNCTION() ? Are there any errors in output log?

In case you didnt know you can filter to help you find if there are any. And do try checking after running the editor and after first run (or dont clear log on every PIE because e.g. not marking as ufunction would show error only the first time)
Screenshot 2021-05-09 210034