How to use a custom struct as Delegate parameter in C++?

In c++, I want to use a custom struct as Delegate parameter and export the function to blueprint. How can I do it?

If I want to use a custom structure as the third parameter in FFooDelegate, what should I fill in ?? with. Is there a specifier like “CustomStructureParam” in Function used for Delegate?

82087-002.png

Thanks:)

Unrecognized type ‘FSafeByte’ - type must be a UCLASS, USTRUCT or UENUM.

I use UE4.10.0.

I use delegate(Foo) rather than direct function call(Foo2) because I want to do some async tasks in C++.

‘FSafeByte’ is just one of my custom structs;

USTRUCT(BlueprintType)
struct FSafeByte {
	GENERATED_USTRUCT_BODY()
    //...
};

If you want to pass a custom struct, you must of course create the struct type first. Then at the event body you can select the custom struct type as a param from the types list in Blueprint editor.

Sorry for my unclear expression. What I need is not “custom struct”, it should be “wildcard structure” as parameter in delegate.

I’m not willing to use an exact struct defined in C++. Structs should be defined in Blueprint with any structure. I have implemented a function in c++ using “wildcard struct” as output parameter, such as the following picture. I wonder if it can be used in delegate.

In blueprint, the output “Structure” can be connected to any type of struct defined in blueprint. ConvertJsonStrToScriptStruct uses struct linked to Structure node to parse json string.

82429-004.png

“CustomStructureParam” is function meta tag used to indicate wildcard struct. Is there a similar tag can be used in delegate?