If you have created a custom tool or window for display within the editor, you probably need some way to let the user make it appear. The easiest way to do this is to create a toolbar customization that adds a new toolbar button, and have it display your window when clicked.
Create a new engine module by following the previous recipe, as we'll need it to initialize our toolbar customization.
Create a new header file, and insert the following class declaration:
#pragma once #include "Commands.h" #include "EditorStyleSet.h" /** * */ class FCookbookCommands : public TCommands<FCookbookCommands> { public: FCookbookCommands() :TCommands<FCookbookCommands>(FName(TEXT("UE4_Cookbook")), FText::FromString("Cookbook Commands"), NAME_None, FEditorStyle::GetStyleSetName()) { }; virtual void RegisterCommands() override; TSharedPtr<FUICommandInfo> MyButton; };
Implement the new class by placing the following in the
.cpp
file:#include...