Navigation
API > API/Plugins > API/Plugins/CommonUI
References
| Module | CommonUI |
| Header | /Engine/Plugins/Runtime/CommonUI/Source/CommonUI/Public/CommonUIUtils.h |
| Include | #include "CommonUIUtils.h" |
namespace CommonUIUtils
{
template<typename... ChildNameArgs>
void CommonUIUtils&58;&58;ValidateBoundWidgetHierarchy
&40;
const UWidgetTree & WidgetTree,
IWidgetCompilerLog & CompileLog,
ECollisionPolicy CollisionPolicy,
FName ParentWidgetName,
ChildNameArgs &&... ChildNames
&41;
}
Remarks
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)); }