Hello,
So we have a thread that every two seconds should excecute a function.
This thread got a “Strategy” attribute which launch a timer.
class TWITCHTEST_API Anarchy : public Strategy
{
public:
Anarchy(UWorld* w, BlockingQueue<FString>* q) : Strategy(q) {
world = w;
world->GetTimerManager().SetTimer(TimerHandle, this, &Anarchy::OnTick, 2, false);
};
FTimerHandle TimerHandle;
UWorld* world;
void Receive() override;
void OnTick() override;
};
During compilation we got this error :
" You cannot use UObject method delegates with raw pointers. "
Is there a way to use FTimerManager in a none UE class, or should we use an other timer from third party library or std ?