haxis/Source/UnrealProject/GUI/SkillTree/HexagonTile.cpp

23 lines
372 B
C++

// Project Lab - NHTV Igad
#include "UnrealProject.h"
#include "HexagonTile.h"
void UHexagonTile::NativeConstruct()
{
TArray<UWidget*> widgets;
WidgetTree->GetAllWidgets(widgets);
for (int32 i = 0; i < widgets.Num(); i++)
{
UImage* tmp = Cast<UImage>(widgets[i]);
if (tmp)
{
material = tmp->GetDynamicMaterial();
break;
}
}
}