Navigation
API > API/Developer > API/Developer/ToolMenus > API/Developer/ToolMenus/UToolMenu > API/Developer/ToolMenus/UToolMenu/FindOrAddSection
References
| Module | ToolMenus |
| Header | /Engine/Source/Developer/ToolMenus/Public/ToolMenu.h |
| Include | #include "ToolMenu.h" |
| Source | /Engine/Source/Developer/ToolMenus/Private/ToolMenu.cpp |
FToolMenuSection & FindOrAddSection
(
const FName SectionName,
const TAttribute < FText > & InLabel,
const FToolMenuInsert InPosition
)
Remarks
Finds an existing section using the provided FName or, if not found, creates a new one and assigns it that FName.
In case the the section did not exist and a new one was created, then the provided label and optional position is also set on the newly created section. A reference to the found or newly created section.
Parameters
| Name | Description |
|---|---|
| SectionName | The section name to find or add. Provide NAME_None to access the unnamed section of this menu. |
| InLabel | The label to set on the section if a new one is created. If an existing section is returned this label is ignored. |
| InPosition | The position to set on the section if a new one is created. If an existing section is returned this position is ignored. |