ClearAllTimersForObject Not Work...

Hi guys,

i’m working on some restart level logic. And for now I’ve added some code dealing with clear all timers using ‘ClearAllTimersForObject’ , just before load level:


 TArray<AActor*> TATemp;
UWorld* tempWorld = WorldContextObject->GetWorld();
UGameplayStatics::GetAllActorsOfClass(tempWorld, AActor::StaticClass(), TATemp);

//Clear timer
for (auto& tempActor : TATemp)
{
tempWorld->GetTimerManager().ClearAllTimersForObject(tempActor);
}

But some timers still fire after this get called. Is there something wrong with this method?

Many thx!