Cannot add ComboButton to Toolbar - why?

Using the Settings dropdown as a guide, I’m trying to add a combo (dropdown) button to the main toolbar:

void FGameDataEditorModule::AddToolbarExtension(FToolBarBuilder& Builder)
{
	Builder.BeginSection("Editors");
	{
		Builder.AddComboButton(
			FUIAction(),
			FOnGetContent::CreateStatic(&FGameDataEditorModule::GenerateGameDataMenu, PluginCommands)
		);
	}
	Builder.EndSection();
}

TSharedRef<SWidget> FGameDataEditorModule::GenerateGameDataMenu(TSharedRef<FUICommandList> InCommandList)
{
	FMenuBuilder MenuBuilder(true, InCommandList);

	MenuBuilder.BeginSection("Data Editors");
	{
		MenuBuilder.AddMenuEntry(FGameDataEditorCommands::Get().OpenPluginWindow);
	}
	MenuBuilder.EndSection();

	return MenuBuilder.MakeWidget();
}

This gives the following compile error:

1>D:\UE4 Projects\PROJECT\Plugins\GameDataEditor\Source\GameDataEditor\Private\GameDataEditor.cpp(126): error C2664: 'TBaseDelegate<TSharedRef<SWidget,0>> TBaseDelegate<TSharedRef<SWidget,0>>::CreateStatic<TSharedPtr<ObjectType,0>>(TSharedRef<SWidget,0> (__cdecl *)(TSharedPtr<ObjectType,0>),TSharedPtr<ObjectType,0>)': cannot convert argument 1 from 'TSharedRef<SWidget,0> (__cdecl FGameDataEditorModule::* )(TSharedRef<ObjectType,0>)' to 'TSharedRef<SWidget,0> (__cdecl *)(TSharedPtr<ObjectType,0>)'
1>          with
1>          [
1>              ObjectType=FUICommandList
1>          ]
1>  D:\UE4 Projects\PROJECT\Plugins\GameDataEditor\Source\GameDataEditor\Private\GameDataEditor.cpp(126): note: There is no context in which this conversion is possible
1>D:\UE4 Projects\PROJECT\Plugins\GameDataEditor\Source\GameDataEditor\Private\GameDataEditor.cpp(127): error C2660: 'FToolBarBuilder::AddComboButton': function does not take 1 arguments

I have no idea why the FOnGetContent entry isn’t being recognized. Can anyone help?

Hi, make sure that the declaration of GenerateGameDataMenu is static
static TSharedRef GenerateGameDataMenu (TSharedRef InCommandList);

Your function’s parameter type is “TSharedRef” in GenerateGameDataMenu,But in CreateStatic,Your parameter type is “TSharedPtr”.

But it’s still wrong ,I’m confused.Did you know the answer?