How can I cheat the SetTimer(..) and pass a method WITH PARAMETER as InTimerMethod parameter of SetTimer(..)?
Basically, it’s all.
Below I’ve wrote, what I tried to do, but did not get result:
Actually, SetTimer(..) wants only void f (void)*. I’ve tried to declare void (void) delegate:
DECLARE_DELEGATE(FMyDelegate);
Then, tried to call SetTimer(..) like this:
int32 Parameter = 2;
TManager.SetTimer(THandle, this, FMyDelegate::CreateUObject(this, &MyClass::MyMethod, Parameter), 10.f, true, 5.f);
MyMethod is declared like this:
void MyClass::MyMethod(int32 Parameter);
But it looks like, it’s impossible to pass delegate, whereas SetTimer(..) waits for pointer to function.
So I returns to my question: How can I feed the SetTimer(..) with MyMethod (which takes 1 parameter), passing this method as InTimerMethod parameter of SetTimer(..)?