CommonUIUtils::ValidateBoundWidgetHierarchy

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

Windows
MacOS
Linux

References

Module

CommonUI

Header

/Engine/Plugins/Experimental/CommonUI/Source/CommonUI/Public/CommonUIUtils.h

Include

#include "CommonUIUtils.h"

Syntax

namespace CommonUIUtils
{
    template<typename... ChildNameArgs>
    void CommonUIUtils::ValidateBoundWidgetHierarchy
    (
        const UWidgetTree & WidgetTree,
        IWidgetCompilerLog & CompileLog,
        ECollisionPolicy CollisionPolicy,
        FName ParentWidgetName,
        ChildNameArgs &&... ChildNames
    )
}

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)); }

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss