How to expose a method pointer to blueprints

Hey,

I am trying to create a menu system that I can build up in blueprints. The general idea is to have a radial menu (like in counter strike global offensive) that has several layers to it as you click through different buttons.

I want the user to be able to build this menu up in blueprints, and assign what method should be called by linking up a method in blueprints. Only thing is, I am new to Unreal and don’t really know what unreal properties or guidelines I should be following to do this. You can see in the code pasted below, the method pointer I would ideally like to expose to blueprints.

USTRUCT(BlueprintType)
struct FRadialItem {

	GENERATED_USTRUCT_BODY()

public:
	UPROPERTY(BlueprintReadWrite, Category = "RadialItem, Name")
	FString DisplayText;

	//TODO: Expose this to blueprints
	void (*selectedEvent)(FRadialItem*);

	void OnInteractWith(ARadialHUD * caller) {

		selectedEvent(this);
	}

};

USTRUCT(BlueprintType)
struct FRadialItemContainer : public FRadialItem {

	GENERATED_USTRUCT_BODY()

	UPROPERTY(BlueprintReadWrite, Category = "RadialItemGroup, Children")
	TArray<FRadialItem> ChildItems;

	void OnInteractWith(ARadialHUD * caller) {

		selectedEvent(this);

		caller->displayItems(ChildItems);
	}
};

Thanks in advance

Thanks for the reply. That uses the UFUNCTION macro that is not available in structs (only in classes)

couldn’t you make a function in the HUD that manages the functionality, and just use the structs as data containers? onInteract, they can return a unique identifier, and the HUD can use that in a switch case or to bind delegates to HUD functions.