How pass function to argument?(C++)
How pass func(from bp or not) in argument?
This not work. P.S Log: (2) Error: Unrecognized type 'FuncName' - type must be a UCLASS, USTRUCT or UENUM
It sounds like you've wrongly placed your delegate declaration. Delegates need to be declared after your includes, but before any class declaration, ie like this:
Do you mind giving us the full code from the first line up until the GENERATED_BODY() of the class?
EDIT: I see you've updated your question. In your case, I believe you are looking to use DECLARE_DYNAMIC_DELEGATE, not DECLARE_DELEGATE. A blueprint cannot use a regular delegate to my knowledge, as it is not compatible with Unreal's reflection system as I've understood it.
My experience using it in a function was like this:
Nothing fancy in this case. Probably ain't quite right, but I didn't think much of it since the delegate effectively only transfers access to the function anyway.
answered Feb 27 '17 at 08:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here