5#include "Containers/Ticker.h"
7#include "Subsystems/GameInstanceSubsystem.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();
97 void InitializeFromDataRegistry();
99 void EnterPreLoadingState();
100 void EnterDuringLoadState();
101 void EnterAwaitShownState();
102 void EnterIdleState();
104 bool HandleAsyncLoadCompleted();
105 void HandleDuringLoadChainCompleted();
106 void HandleLevelShown();
107 void HandleLevelHidden();
111 void PreloadNiagaraEffectsAsync(TWeakObjectPtr<ULevelStreamingData> RequestedStreamingData);
112 void ReleaseNiagaraEffectsPreload();
116 UPROPERTY(BlueprintAssignable, Category =
"Level|Streaming")
117 FOnLevelLoadCompleted OnLevelLoadCompleted;
119 UPROPERTY(BlueprintAssignable, Category = "Level|Streaming")
120 FOnLevelLoadedInMemory OnLevelLoadedInMemory;
122 UPROPERTY(BlueprintAssignable, Category = "Level|Streaming")
123 FOnPlacePlayerTheWorld OnPlacePlayerTheWorld;
128 static ULevelStreaming* FindVisible(
const UWorld* World);
129 static ULevelStreaming* FindByName(
const UWorld* World, FName LevelName);
130 static void PrepareLevelForLoad(ULevelStreaming* StreamingLevel,
bool bShouldBeLoaded);
131 static ULevelStreaming* ResolveTargetLevel(UObject* WorldContextObject, FName LevelName,
bool& bOutAlreadyLoaded,
bool& bOutSuccess);
138 void TryInitializeCurrentStage();
139 bool IsInitializedForCurrentWorld()
const;
143 bool OnWaitForPlayTick(
float DeltaTime);
147 TWeakObjectPtr<ULevelStreamingSubsystem>
Owner;
165 TWeakObjectPtr<ULevelStreaming> LevelToLoad;
168 TWeakObjectPtr<ULevelStreaming> LevelToUnload;
175 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
Definition LevelPlayerPlacer.h:17
Definition LevelStreamingData.h:17
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:135
FTSTicker::FDelegateHandle InitTickerHandle
Definition LevelStreamingSubsystem.h:148
TWeakObjectPtr< ULevelStreamingSubsystem > Owner
Definition LevelStreamingSubsystem.h:147
TWeakObjectPtr< UWorld > InitializedWorld
Definition LevelStreamingSubsystem.h:146
Definition LevelStreamingSubsystem.h:127