Navigation
API > API/Developer > API/Developer/ToolMenus > API/Developer/ToolMenus/UToolMenu
Description
Add a section to the menu. When adding sections while registering a menu with UToolMenus::Get()->RegisterMenu(), always use this function. This will ensure that sections have the right label and are presented in the intended order regardless of when menu extensions are performed.
| Name | AddSection |
| Type | function |
| Header File | /Engine/Source/Developer/ToolMenus/Public/ToolMenu.h |
| Include Path | #include "ToolMenu.h" |
| Source | /Engine/Source/Developer/ToolMenus/Private/ToolMenu.cpp |
FToolMenuSection & AddSection
(
const FName SectionName,
const TAttribute< FText > & InLabel,
const FToolMenuInsert InPosition
)
A reference to the created section.
Parameters
| Name | Remarks |
|---|---|
| SectionName | The name of the section. |
| InLabel | The label to set on the section. |
| InPosition | The position of the section within its parent menu. |