Hi, trying to make a combo button ( drop down ) in my plugin i get this assert crash at engine startup :
i made a simple button plugin ( with default code )
my header file has( not the full file, but the needed part ) :
#include "SharedPointer.h"
class FDPGPostProcessModule : public IModuleInterface , public TSharedFromThis<FDPGPostProcessModule>
private:
TSharedRef<SWidget> MakeGeneralMenu();
in the cpp file i now have this ( everything work fine if i don’t have the AddComboButton part )
void FDPGPostProcessModule::AddToolbarExtension(FToolBarBuilder& Builder)
{
Builder.AddSeparator();
Builder.AddComboButton(FUIAction(),
FOnGetContent::CreateSP(this, &FDPGPostProcessModule::MakeGeneralMenu),
LOCTEXT("GeneralOptions", "General Options"),
LOCTEXT("GeneralOptionsToolTip", "General Options"),
FSlateIcon(FDPGPostProcessStyle::GetStyleSetName(), "DPGPostProcess.PluginActionSettingLoad"));
Builder.AddToolBarButton(FDPGPostProcessCommands::Get().PluginActionSettingSave);
Builder.AddToolBarButton(FDPGPostProcessCommands::Get().PluginActionSettingLoad);
}
As you can see, i made my class inherit “TSharedFromThis” so it can be used fot the getContent delegate, so now, it compile, but crash :-/
for now MakeGeneralMenu is ‘empty’ but that shouldn’t be a problem until it’s called