5#include "Containers/Ticker.h"
6#include "CoreMinimal.h"
13#include "LevelStreamingSubsystem.generated.h"
26struct FStreamableHandle;
42 virtual void Initialize(FSubsystemCollectionBase& Collection)
override;
43 virtual void Deinitialize()
override;
44 virtual void Tick(
float DeltaTime)
override;
45 virtual bool IsTickable()
const override;
48 void PlacePlayerInLevel();
52 UFUNCTION(BlueprintCallable, Category =
"Level|Streaming")
69 return GetWorld() && !GetWorld()->GetStreamingLevels().IsEmpty();
74 return CachedStageDictionary.Get();
77 FORCEINLINE
virtual TStatId
GetStatId()
const override
84 return StreamingStateMachine.IsBusy();
89 return InitialStageBootstrap.IsInitializedForCurrentWorld();
94 bool InvalidateLevelLoadRequest(
const ULevelStreamingData* ReqLevelLoadPipelineData, ULevelStreaming*& PreviousLevelStreaming)
const;
95 void HandleLevelLoading(
const ULevelStreamingData* ReqLevelStreamingData, ULevelStreaming* TargetLevel);
96 bool CacheStreamingDataFromStageDictionary();
98 void EnterPreLoadingState();
99 void EnterDuringLoadState();
100 void EnterAwaitShownState();
101 void EnterIdleState();
103 bool HandleAsyncLoadCompleted();
104 void HandleDuringLoadChainCompleted();
105 void HandleLevelShown();
106 void HandleLevelHidden();
110 void PreloadNiagaraEffectsAsync(TWeakObjectPtr<ULevelStreamingData> RequestedStreamingData);
111 void ReleaseNiagaraEffectsPreload();
115 UPROPERTY(BlueprintAssignable, Category =
"Level|Streaming")
116 FOnLevelLoadCompleted OnLevelLoadCompleted;
118 UPROPERTY(BlueprintAssignable, Category = "Level|Streaming")
119 FOnLevelLoadedInMemory OnLevelLoadedInMemory;
121 UPROPERTY(BlueprintAssignable, Category = "Level|Streaming")
122 FOnPlacePlayerTheWorld OnPlacePlayerTheWorld;
127 static ULevelStreaming* FindVisible(
const UWorld* World);
128 static ULevelStreaming* FindByName(
const UWorld* World, FName LevelName);
129 static void PrepareLevelForLoad(ULevelStreaming* StreamingLevel,
bool bShouldBeLoaded);
130 static ULevelStreaming* ResolveTargetLevel(UObject* WorldContextObject, FName LevelName,
bool& bOutAlreadyLoaded,
bool& bOutSuccess);
137 void TryInitializeCurrentStage();
138 bool IsInitializedForCurrentWorld()
const;
142 bool OnWaitForPlayTick(
float DeltaTime);
146 TWeakObjectPtr<ULevelStreamingSubsystem>
Owner;
164 TWeakObjectPtr<ULevelStreaming> LevelToLoad;
167 TWeakObjectPtr<ULevelStreaming> LevelToUnload;
177 TSharedPtr<FStreamableHandle> NiagaraPreloadHandle;
ELevelStreamingPhase
Definition ELevelStreamingEnums.h:7
DECLARE_MULTICAST_DELEGATE(FOnLevelStreamingDataMapReady)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnPlacePlayerTheWorld, ULevelPlayerPlacer *, Placer, UWorld *, World)
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnLevelLoadCompleted)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnLevelLoadedInMemory, ULevelStreamingData *, StreamingData)
Definition StageFlowDefinition.h:27
Definition StreamingEventListenerInterface.h:23
DataBundle의 로드/언로드를 관리하는 GameInstance 서브시스템.
Definition DataBundleRegistry.h:42
Definition LevelPlayerPlacer.h:17
Definition LevelStreamingData.h:19
Definition LevelStreamingEffect.h:121
Definition LevelStreamingSubsystem.h:38
FORCEINLINE bool IsLevelLoadRequested() const
Definition LevelStreamingSubsystem.h:82
FORCEINLINE const UStageDictionary * GetStageDictionary() const
Definition LevelStreamingSubsystem.h:72
virtual FORCEINLINE TStatId GetStatId() const override
Definition LevelStreamingSubsystem.h:77
FORCEINLINE bool IsLaunchedFromPersistentLevel() const
Definition LevelStreamingSubsystem.h:67
FORCEINLINE bool IsInitialStageInitialized() const
Definition LevelStreamingSubsystem.h:87
Definition StageDictionary.h:14
레벨 스트리밍 이펙트 체인의 순차 실행을 담당합니다.
Definition LevelStreamingEffect.h:23
Definition LevelStreamingContext.h:16
Definition LevelStreamingStateMachine.h:11
Definition LevelStreamingSubsystem.h:134
FTSTicker::FDelegateHandle InitTickerHandle
Definition LevelStreamingSubsystem.h:147
TWeakObjectPtr< ULevelStreamingSubsystem > Owner
Definition LevelStreamingSubsystem.h:146
TWeakObjectPtr< UWorld > InitializedWorld
Definition LevelStreamingSubsystem.h:145
Definition LevelStreamingSubsystem.h:126