FToolElementRegistry::GenerateWidget

Generates the widget for the tool element denoted by the [FToolElementRegistrationKey](API\Developer\WidgetRegistration\FToolElementRegistrationKey), using the specified TSharedPtr if provided (otherwise it will use the default registered registration arguments. If bUpdateRegistrationArgs is set to true and RegistrationArgsSP is not nullptr, the specified registration args will replace the existing ones for the tool element.

Unreal Engine C++ API Reference > Developer > WidgetRegistration > FToolElementRegistry

References

   
Module WidgetRegistration
Header /Engine/Source/Developer/WidgetRegistration/Public/ToolElementRegistry.h
Include #include "ToolElementRegistry.h"
Source /Engine/Source/Developer/WidgetRegistration/Private/ToolElementRegistry.cpp
[TSharedRef](API\Runtime\Core\Templates\TSharedRef)< [SWidget](API\Runtime\SlateCore\Widgets\SWidget) > GenerateWidget
(
    [TSharedRef](API\Runtime\Core\Templates\TSharedRef)< [FToolElementRegistrationKey](API\Developer\WidgetRegistration\FToolElementRegistrationKey) > ToolElementKeySR,
    [TSharedPtr](API\Runtime\Core\Templates\TSharedPtr)< [FToolElementRegistrationArgs](API\Developer\WidgetRegistration\FToolElementRegistrationArgs) > RegistrationArgsSP,
    bool bUpdateRegistrationArgs
)

Remarks

Generates the widget for the tool element denoted by the FToolElementRegistrationKey, using the specified TSharedPtr if provided (otherwise it will use the default registered registration arguments. If bUpdateRegistrationArgs is set to true and RegistrationArgsSP is not nullptr, the specified registration args will replace the existing ones for the tool element.

Parameters

Name Description
ToolElementKeySR the TSharedRef which is the key to the tool element for which we want to generate the widget
RegistrationArgsSP The SharedPtr to the FToolElementRegistrationArgs for the tool element for which which we want to generate the widget
bUpdateRegistrationArgs a bool that indicates whether we store any provided FToolElementRegistrationArgs as the new FToolElementRegistrationArgs for this tool element

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library