I wrote a Blueprint Function Library with a function i want to be called every 5 seconds.
I want to start and stop the timed execution with 2 wrapper functions:
CLASS()
class URemotelabInterface : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
static void callMeEvery5Sec(){ /*doSomethingHere*/ };
UFUNCTION(BlueprintCallable, Category = "MyBPFunctionLib")
static void startTimedExecution(){ ????? }
UFUNCTION(BlueprintCallable, Category = "MyBPFunctionLib")
static void stopTimedExecution(){ ????? }
}
As far as I know the timer functions is only available inside AActor classes and can only be called in a non-static context. In a blueprint function library I do not inherit the AActor class and have to access the timer from a static function.
Is there any possible way to implement it as i want to? Or is there a workaround?
greetings