Module |
|
Header |
/Engine/Plugins/Experimental/CommonUI/Source/CommonUI/Public/CommonUIUtils.h |
Include |
#include "CommonUIUtils.h" |
namespace CommonUIUtils
{
template<typename... ChildNameArgs>
void CommonUIUtils::ValidateBoundWidgetHierarchy
(
const UWidgetTree & WidgetTree,
IWidgetCompilerLog & CompileLog,
ECollisionPolicy CollisionPolicy,
FName ParentWidgetName,
ChildNameArgs &&... ChildNames
)
}
Validates that a given widget tree hierarchy satisfies the condition that a given widget contains N other widgets (optionally requiring individual slots for each) Intended to be called from within a widget subclass's ValidateCompiledWidgetTree override If the given hierarchy does not satisfy the requirements, we'll log an error in the compiler log
void MyWidget::ValidateCompiledWidgetTree(const UWidgetTree& BlueprintWidgetTree, IWidgetCompilerLog& CompileLog) const { Super::ValidateCompiledWidgetTree(BlueprintWidgetTree, CompileLog);
const CommonUIUtils::ECollisionPolicy CollisionPolicy = CommonUIUtils::ECollisionPolicy::Forbid; CommonUIUtils::ValidateBoundWidgetHierarchy(BlueprintWidgetTree, CompileLog, CollisionPolicy, GET_MEMBER_NAME_CHECKED(MyWidget, MySubWidget1Name), GET_MEMBER_NAME_CHECKED(MyWidget, MySubWidget2Name)); }