Announcement

Collapse
No announcement yet.

ClearAllTimersForObject Not Work...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:
    Code:
     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!
    Last edited by wzspdw; 11-23-2020, 08:55 AM.
Working...
X