14#include "GameFramework/PlayerController.h"
15#include "Engine/LocalPlayer.h"
16#include "Engine/GameInstance.h"
17#include "Engine/GameViewportClient.h"
18#include "Blueprint/UserWidget.h"
19#include "Engine/Engine.h"
20#include "Engine/World.h"
23#define LOADINGCIRCLEWIDGET_PATH TEXT("/Game/CustomContents/UI/WBP_LoadingCircle.WBP_LoadingCircle_C")
32 if (World ==
nullptr || !World->IsGameWorld())
52 ULocalPlayer* LocalPlayer = GetLocalPlayer();
53 if (LocalPlayer ==
nullptr)
56 APlayerController* PC = LocalPlayer->GetPlayerController(World);
88 if (UWorld* World = GetWorld())
98 PRINTLOG(TEXT(
"[LoadingCircleManager] Show FAILED - Widget is nullptr!"));
112 PRINTLOG(TEXT(
"[LoadingCircleManager] WARNING: Hide called but count was already 0!"));
115 if (UWorld* World = GetWorld())
128 PRINTLOG(TEXT(
"[LoadingCircleManager] Hide FAILED - Widget is nullptr!"));
FComponentHelper 구조체를 선언합니다.
YiSan 전반에서 사용하는 공용 인터페이스를 선언합니다.
#define PRINTLOG(fmt,...)
ULoadginCircle 클래스를 선언합니다.
#define LOADINGCIRCLEWIDGET_PATH
ULoadingCircleManager 클래스를 선언합니다.
네트워크 대기 상태를 표시하는 로딩 서클 위젯입니다.
void AddToGameViewport(int32 ZOrder)
위젯을 Game Viewport에 추가하여 레벨 전환 시에도 유지되도록 합니다.
void EnsureWidgetForWorld(UWorld *World)
현재 월드에 위젯이 없으면 생성하고 Game Viewport에 부착합니다.
TObjectPtr< class ULoadginCircle > CircleWidget
void Show()
로딩 카운트를 증가시킵니다.
void LoadingCircle(bool bShow)
로딩 서클을 표시하거나 숨깁니다.
TSubclassOf< class ULoadginCircle > CircleWidgetClass
int32 LoadingCount
Manager가 관리하는 로딩 카운트 (위젯 재생성 시에도 유지됨)
void Hide()
로딩 카운트를 감소시킵니다.
int32 GetLoadingCount() const
현재 로딩 카운트를 반환합니다.
static const int32 LoadingCircle
static T * LoadAsset(const TCHAR *Path)