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:
But some timers still fire after this get called. Is there something wrong with this method?
Many thx!
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:
Code:
TArray<AActor*> TATemp; UWorld* tempWorld = WorldContextObject->GetWorld(); UGameplayStatics::GetAllActorsOfClass(tempWorld, AActor::StaticClass(), TATemp); //Clear timer for (auto& tempActor : TATemp) { tempWorld->GetTimerManager().ClearAllTimersForObject(tempActor); }
Many thx!