Привет, поэтому я пытаюсь добавить виджет в область просмотра, но он вернет нулевой код:
if (NewEyeClass != nullptr) {
CurrentWidget = CreateWidget<UUserWidget>(GetWorld(), NewEyeClass);
if (CurrentWidget)
{
CurrentWidget->AddToViewport();
}
}
Конструктор
static ConstructorHelpers::FClassFinder<UUserWidget> NewEyeObj(TEXT("/Game/UI/Widgets/UI_StormEye"))
NewEyeClass = NewEyeObj.Class