So I am trying to pass a function to another function, similair to the FTimerManager.SetTimer.
I just can’t get it to work. I have looked a little into TFunction and TFunctionRef, but I couldn’t find good enough sources for me. Lamdba’s could be another way to go I heard, but I also have heard of function pointers.
Where do I start? And where are good sources/examples.
I am fine with only taking void functions with no parameters. As for why I am trying to do this, I am trying to expose some of the multithreading capabilities to blueprints.
You could add a 2nd function which will be a UFUNCTION() and pass it the return value of your TFunction and use that 2nd function to expose the value in BP. Other than that, yes delegates are a bit more complex but it is the way unreal adds function calls on runtime.