You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#ROBOMERGE-AUTHOR: jorge.gonzalez #ROBOMERGE-SOURCE: CL 20372239 via CL 20372260 via CL 20372279 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v949-20362246) [CL 20373433 by jorge gonzalez in ue5-main branch]
33 lines
874 B
C++
33 lines
874 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Animation/WidgetAnimationBinding.h"
|
|
#include "UObject/Object.h"
|
|
#include "Components/Widget.h"
|
|
#include "Blueprint/WidgetTree.h"
|
|
|
|
|
|
/* FWidgetAnimationBinding interface
|
|
*****************************************************************************/
|
|
|
|
UObject* FWidgetAnimationBinding::FindRuntimeObject(const UWidgetTree& WidgetTree, UUserWidget& UserWidget ) const
|
|
{
|
|
if (bIsRootWidget)
|
|
{
|
|
return &UserWidget;
|
|
}
|
|
|
|
UObject* FoundObject = WidgetTree.FindWidget(*WidgetName.ToString());
|
|
|
|
if (FoundObject && (SlotWidgetName != NAME_None))
|
|
{
|
|
// if we were animating the slot, look up the slot that contains the widget
|
|
UWidget* WidgetObject = CastChecked<UWidget>(FoundObject);
|
|
|
|
if (WidgetObject->Slot)
|
|
{
|
|
FoundObject = WidgetObject->Slot;
|
|
}
|
|
}
|
|
|
|
return FoundObject;
|
|
} |