Can we do : staticVariableDelegate.CreateStatic(Class::staticVar, &Class::staticFunc)
Hi,
What is Class::staticVar? The function is static, so you don’t need an object reference of any kind:
staticVariableDelegate.CreateStatic(&Class::staticFunc)
Also, you probably want to use BindStatic, not CreateStatic. CreateStatic will return a new delegate without changing staticVariableDelegate, whereas BindStatic ‘assigns’ a new binding to staticVariableDelegate. These are interchangeable:
staticVariableDelegate.BindStatic(&Class::staticFunc);
staticVariableDelegate = FMyDelegateType::CreateStatic(&Class::staticFunc);
Hope this helps,
Steve