Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
ULevelStreamingSubsystem 클래스 참조

#include <LevelStreamingSubsystem.h>

ULevelStreamingSubsystem에 대한 상속 다이어그램 :
Inheritance graph
ULevelStreamingSubsystem에 대한 협력 다이어그램:
Collaboration graph

클래스

struct  FInitialStageBootstrapper
 
struct  FLevelStreamingUtility
 

Public 멤버 함수

virtual void Initialize (FSubsystemCollectionBase &Collection) override
 
virtual void Deinitialize () override
 
virtual void Tick (float DeltaTime) override
 
virtual bool IsTickable () const override
 
void PlacePlayerInLevel ()
 
AUStageFlowDefinitionGetCurrentFlowDefinition () const
 
void RequestLevelLoad (ULevelStreamingData *ReqLevelLoadPipelineData)
 
void OnLevelLoaded ()
 
void OnLevelShown ()
 
void OnLevelHidden ()
 
FORCEINLINE bool IsLaunchedFromPersistentLevel () const
 
FORCEINLINE const UStageDictionaryGetStageDictionary () const
 
virtual FORCEINLINE TStatId GetStatId () const override
 
FORCEINLINE bool IsLevelLoadRequested () const
 
FORCEINLINE bool IsInitialStageInitialized () const
 

Public 속성

FOnLevelLoadCompleted OnLevelLoadCompleted
 
FOnLevelLoadedInMemory OnLevelLoadedInMemory
 
FOnPlacePlayerTheWorld OnPlacePlayerTheWorld
 

Private 멤버 함수

AUStageFlowDefinitionGetPreviousFlowDefinition () const
 
bool InvalidateLevelLoadRequest (const ULevelStreamingData *ReqLevelLoadPipelineData, ULevelStreaming *&PreviousLevelStreaming) const
 
void HandleLevelLoading (const ULevelStreamingData *ReqLevelStreamingData, ULevelStreaming *TargetLevel)
 
bool CacheStreamingDataFromStageDictionary ()
 
void EnterPreLoadingState ()
 
void EnterDuringLoadState ()
 
void EnterAwaitShownState ()
 
void EnterIdleState ()
 
bool HandleAsyncLoadCompleted ()
 
void HandleDuringLoadChainCompleted ()
 
void HandleLevelShown ()
 
void HandleLevelHidden ()
 
void StartChain (ELevelStreamingPhase Phase)
 
void NotifyLevelLoaded (ULevelStreamingData *StreamingData) const
 
void PreloadNiagaraEffectsAsync (TWeakObjectPtr< ULevelStreamingData > RequestedStreamingData)
 
void ReleaseNiagaraEffectsPreload ()
 
void ForEachSendStreamingEvent (const ULevel *LoadedLevel, const TFunctionRef< void(IStreamingEventListenerInterface &)> &Callback) const
 

Private 속성

TObjectPtr< UStageDictionaryCachedStageDictionary
 
TArray< TObjectPtr< ULevelStreamingEffect > > AllRegisteredEffects
 
TObjectPtr< ULevelStreamingDataLevelStreamingData
 
TObjectPtr< ULevelPlayerPlacerActivePlayerPlacer
 
TWeakObjectPtr< ULevelStreaming > LevelToLoad
 
TWeakObjectPtr< ULevelStreaming > LevelToUnload
 
TObjectPtr< UDataBundleRegistryBundleRegistry
 
FEffectChainExecutor ChainExecutor
 
FInitialStageBootstrapper InitialStageBootstrap
 
FLevelStreamingStateMachine StreamingStateMachine
 
TSharedPtr< FStreamableHandle > NiagaraPreloadHandle
 

Friends

struct FLevelStreamingStateMachine
 

멤버 함수 문서화

◆ CacheStreamingDataFromStageDictionary()

bool ULevelStreamingSubsystem::CacheStreamingDataFromStageDictionary ( )
private
665{
666 CachedStageDictionary = GetEnvironmentAssetByKey<UStageDictionary>("StageDictionary");
667
668 if (CachedStageDictionary == nullptr)
669 {
670 LOG_ERROR(LogCKLevel, "Failed to load StageDictionary from key '%s'.", TEXT("StageDictionary"));
671 return false;
672 }
673
674 return true;
675}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:40
TObjectPtr< UStageDictionary > CachedStageDictionary
Definition LevelStreamingSubsystem.h:152
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ Deinitialize()

void ULevelStreamingSubsystem::Deinitialize ( )
overridevirtual
355{
356 if (LevelToLoad.IsValid())
357 {
358 LevelToLoad->OnLevelLoaded.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelLoaded);
359 LevelToLoad->OnLevelShown.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelShown);
360 }
361
362 if (LevelToUnload.IsValid())
363 {
364 LevelToUnload->OnLevelLoaded.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelLoaded);
365 LevelToUnload->OnLevelShown.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelShown);
366 LevelToUnload->OnLevelHidden.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelHidden);
367 }
368
369 if (AUStageFlowDefinition* PrevDefinition = GetPreviousFlowDefinition())
370 {
371 PrevDefinition->OnLevelUnloaded();
372 }
373
374 if (AUStageFlowDefinition* CurrDefinition = GetCurrentFlowDefinition())
375 {
376 CurrDefinition->OnLevelUnloaded();
377 }
378
381
383 ActivePlayerPlacer = nullptr;
384 LevelStreamingData = nullptr;
385 LevelToLoad.Reset();
386 LevelToUnload.Reset();
387 Super::Deinitialize();
388}
Definition StageFlowDefinition.h:27
void OnLevelLoaded()
Definition LevelStreamingSubsystem.cpp:418
AUStageFlowDefinition * GetPreviousFlowDefinition() const
Definition LevelStreamingSubsystem.cpp:455
void ReleaseNiagaraEffectsPreload()
Definition LevelStreamingSubsystem.cpp:654
FLevelStreamingStateMachine StreamingStateMachine
Definition LevelStreamingSubsystem.h:174
TObjectPtr< ULevelPlayerPlacer > ActivePlayerPlacer
Definition LevelStreamingSubsystem.h:161
TWeakObjectPtr< ULevelStreaming > LevelToLoad
Definition LevelStreamingSubsystem.h:164
void OnLevelHidden()
Definition LevelStreamingSubsystem.cpp:430
TObjectPtr< ULevelStreamingData > LevelStreamingData
Definition LevelStreamingSubsystem.h:158
AUStageFlowDefinition * GetCurrentFlowDefinition() const
Definition LevelStreamingSubsystem.cpp:435
TWeakObjectPtr< ULevelStreaming > LevelToUnload
Definition LevelStreamingSubsystem.h:167
FInitialStageBootstrapper InitialStageBootstrap
Definition LevelStreamingSubsystem.h:173
void OnLevelShown()
Definition LevelStreamingSubsystem.cpp:424
void Reset()
Definition LevelStreamingStageMachine.cpp:12
void Reset()
Definition LevelStreamingSubsystem.cpp:128
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EnterAwaitShownState()

void ULevelStreamingSubsystem::EnterAwaitShownState ( )
private
713{
714 if (LevelToUnload.IsValid())
715 {
716 LevelToUnload->OnLevelHidden.AddUniqueDynamic(this, &ULevelStreamingSubsystem::OnLevelHidden);
717 LevelToUnload->SetShouldBeVisible(false);
718 LevelToUnload->SetShouldBeLoaded(true);
719 }
720
721 if (LevelToLoad.IsValid() == false)
722 {
723 return;
724 }
725
726 LevelToLoad->OnLevelShown.AddUniqueDynamic(this, &ULevelStreamingSubsystem::OnLevelShown);
727 LevelToLoad->SetShouldBeVisible(true);
728 LevelToLoad->SetShouldBeLoaded(true);
729}
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EnterDuringLoadState()

void ULevelStreamingSubsystem::EnterDuringLoadState ( )
private
705{
706 ULevelStreaming* TargetLevel = FLevelStreamingUtility::FindByName(GetWorld(), LevelStreamingData->TargetMap.PrimaryAssetName);
708 StartChain(ELevelStreamingPhase::DuringLoad);
709}
void HandleLevelLoading(const ULevelStreamingData *ReqLevelStreamingData, ULevelStreaming *TargetLevel)
Definition LevelStreamingSubsystem.cpp:475
void StartChain(ELevelStreamingPhase Phase)
Definition LevelStreamingSubsystem.cpp:540
static ULevelStreaming * FindByName(const UWorld *World, FName LevelName)
Definition LevelStreamingSubsystem.cpp:49
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EnterIdleState()

void ULevelStreamingSubsystem::EnterIdleState ( )
private
733{
735 {
736 Definition->OnLevelStreamingEnded();
737 }
738 else
739 {
740 LOG_WARNING(LogCK, "%s is not initialized.", NAMEOF(AUStageFlowDefinition));
741 }
742
743 ForEachSendStreamingEvent(LevelToLoad.IsValid() ? LevelToLoad->GetLoadedLevel() : nullptr, [](IStreamingEventListenerInterface& Listener)
744 {
745 Listener.OnLevelStreamingEnded();
746 });
747
748 OnLevelLoadCompleted.Broadcast();
749 LevelToUnload.Reset();
750}
#define NAMEOF(Type)
Definition CK_UE.h:30
#define LOG_WARNING(Category, Format,...)
Definition CK_UE.h:39
Definition StreamingEventListenerInterface.h:23
void ForEachSendStreamingEvent(const ULevel *LoadedLevel, const TFunctionRef< void(IStreamingEventListenerInterface &)> &Callback) const
Definition LevelStreamingSubsystem.cpp:556
FOnLevelLoadCompleted OnLevelLoadCompleted
Definition LevelStreamingSubsystem.h:116
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EnterPreLoadingState()

void ULevelStreamingSubsystem::EnterPreLoadingState ( )
private
679{
681 {
682 Definition->OnLevelStreamingStarted();
683 }
684
685 ForEachSendStreamingEvent(LevelToUnload.IsValid() ? LevelToUnload->GetLoadedLevel() : nullptr, [](IStreamingEventListenerInterface& Listener)
686 {
687 Listener.OnLevelStreamingStarted();
688 });
689
690 TArray<ULevelStreamingEffect*> CreatedEffects = LevelStreamingData->CreateEffects(this);
691
692 AllRegisteredEffects.Reset();
693
694 for (ULevelStreamingEffect* Effect : CreatedEffects)
695 {
696 AllRegisteredEffects.Add(Effect);
697 }
698
699 ChainExecutor.SetupEffects(CreatedEffects);
700 StartChain(ELevelStreamingPhase::PreLoad);
701}
Definition LevelStreamingEffect.h:121
TArray< TObjectPtr< ULevelStreamingEffect > > AllRegisteredEffects
Definition LevelStreamingSubsystem.h:155
FEffectChainExecutor ChainExecutor
Definition LevelStreamingSubsystem.h:172
void SetupEffects(const TArray< ULevelStreamingEffect * > &AllEffects)
이펙트 목록을 Phase별로 분류해 내부 체인 맵을 구성합니다.
Definition LevelStreamingEffect.cpp:9
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ ForEachSendStreamingEvent()

void ULevelStreamingSubsystem::ForEachSendStreamingEvent ( const ULevel *  LoadedLevel,
const TFunctionRef< void(IStreamingEventListenerInterface &)> &  Callback 
) const
private
557{
558 if (LoadedLevel == nullptr)
559 {
560 return;
561 }
562
563 TArray<USubsystem*> Subsystems;
564 const UWorld* World = GetWorld();
565
566 if (World)
567 {
568 Subsystems.Append(World->GetSubsystemArrayCopy<UWorldSubsystem>());
569 }
570
571 if (const ULocalPlayer* Player = World->GetGameInstance()->GetFirstGamePlayer())
572 {
573 Subsystems.Append(Player->GetSubsystemArrayCopy<ULocalPlayerSubsystem>());
574 }
575
576 if (Subsystems.IsEmpty())
577 {
578 return;
579 }
580
581 for (USubsystem* Subsystem : Subsystems)
582 {
583 if (Subsystem && Subsystem->GetClass()->ImplementsInterface(UStreamingEventListenerInterface::StaticClass()))
584 {
585 Callback(*(Cast<IStreamingEventListenerInterface>(Subsystem)));
586 }
587 }
588}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetCurrentFlowDefinition()

AUStageFlowDefinition * ULevelStreamingSubsystem::GetCurrentFlowDefinition ( ) const
436{
437 if (LevelToLoad.IsValid() == false)
438 {
439 return nullptr;
440 }
441
442 ALevelScriptActor* LevelActor = LevelToLoad->GetLevelScriptActor();
443
444 if (LevelActor == nullptr)
445 {
446 return nullptr;
447 }
448 else
449 {
450 return Cast<AUStageFlowDefinition>(LevelActor);
451 }
452}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetPreviousFlowDefinition()

AUStageFlowDefinition * ULevelStreamingSubsystem::GetPreviousFlowDefinition ( ) const
private
456{
457 if (LevelToUnload.IsValid() == false)
458 {
459 return nullptr;
460 }
461
462 ALevelScriptActor* LevelActor = LevelToUnload->GetLevelScriptActor();
463
464 if (LevelActor == nullptr)
465 {
466 return nullptr;
467 }
468 else
469 {
470 return Cast<AUStageFlowDefinition>(LevelActor);
471 }
472}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetStageDictionary()

FORCEINLINE const UStageDictionary * ULevelStreamingSubsystem::GetStageDictionary ( ) const
inline
73 {
74 return CachedStageDictionary.Get();
75 }

◆ GetStatId()

virtual FORCEINLINE TStatId ULevelStreamingSubsystem::GetStatId ( ) const
inlineoverridevirtual
78 {
79 RETURN_QUICK_DECLARE_CYCLE_STAT(ULevelStreamingSubsystem, STATGROUP_Tickables);
80 }
Definition LevelStreamingSubsystem.h:38

◆ HandleAsyncLoadCompleted()

bool ULevelStreamingSubsystem::HandleAsyncLoadCompleted ( )
private
754{
755 if (LevelToLoad.IsValid() == false)
756 {
757 LOG_ERROR(LogCKLevel, "Failed to find loaded level streaming.");
758 return false;
759 }
760
761 ULevelStreaming* StreamingLevel = LevelToLoad.Get();
762 LOG_INFO(LogCKLevel, "'%s' is loaded.", *StreamingLevel->GetWorldAsset().GetAssetName());
763 StreamingLevel->OnLevelLoaded.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelLoaded);
764
765 ULevel* LoadedLevel = StreamingLevel->GetLoadedLevel();
766
767 if (LoadedLevel == nullptr)
768 {
769 LOG_ERROR(LogCKLevel, "LoadedLevel이 nullptr 입니다.");
770 return false;
771 }
772
773 if (LevelStreamingData == nullptr)
774 {
775 LOG_ERROR(LogCKLevel, "%s is null.", NAMEOF(ULevelStreamingData));
776 return false;
777 }
778
779 if (AUStageFlowDefinition* PrevDefinition = GetPreviousFlowDefinition())
780 {
781 PrevDefinition->OnLevelUnloaded();
782 }
783
785
786 if (CurrentFlowDefinition)
787 {
788 CurrentFlowDefinition->OnLevelLoaded(LoadedLevel, LevelStreamingData);
789 }
790 else
791 {
792 LOG_ERROR(LogCK, "Failed to create %s.", NAMEOF(AUStageFlowDefinition));
793 }
794
795 if (LevelToUnload.IsValid())
796 {
798 {
799 Listener.OnLevelUnloaded();
800 });
801 }
802
803 ForEachSendStreamingEvent(LoadedLevel, [this, LoadedLevel](IStreamingEventListenerInterface& Listener)
804 {
805 Listener.OnLevelLoaded(LoadedLevel, LevelStreamingData);
806 });
807
808 return true;
809}
#define LOG_INFO(Category, Format,...)
Definition CK_UE.h:38
virtual void OnLevelLoaded(ULevel *NewLevel, const ULevelStreamingData *LevelStreamingData) final
Definition StageFlowDefinition.cpp:56
static AUStageFlowDefinition * GetStageFlowDefinition(const ULevel *CurrentLoadedLevel, ULevelStreamingData *Data)
Definition StageFlowDefinition.cpp:15
virtual void OnLevelLoaded(ULevel *NewLevel, const ULevelStreamingData *LevelStreamingData)=0
Definition LevelStreamingData.h:19
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ HandleDuringLoadChainCompleted()

void ULevelStreamingSubsystem::HandleDuringLoadChainCompleted ( )
private
813{
814 check(BundleRegistry);
815
816 const FGameplayTagContainer& BundleTags = LevelStreamingData->UsingBundlesTag;
817 TWeakObjectPtr<ULevelStreamingData> RequestedStreamingData = LevelStreamingData;
818 BundleRegistry->ReleaseUnusedBundles(BundleTags);
819
820 if (BundleTags.IsEmpty())
821 {
822 NotifyLevelLoaded(RequestedStreamingData.Get());
824 return;
825 }
826
827 BundleRegistry->RequestLoad(BundleTags, [this, RequestedStreamingData](TArray<UDataBundleDefinition*>)
828 {
829 NotifyLevelLoaded(RequestedStreamingData.Get());
831 });
832}
void NotifyLevelLoaded(ULevelStreamingData *StreamingData) const
Definition LevelStreamingSubsystem.cpp:591
TObjectPtr< UDataBundleRegistry > BundleRegistry
Definition LevelStreamingSubsystem.h:170
void NotifyBundleLoadCompleted()
Definition LevelStreamingStageMachine.cpp:41
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ HandleLevelHidden()

void ULevelStreamingSubsystem::HandleLevelHidden ( )
private
903{
904 if (LevelToUnload.IsValid())
905 {
906 LevelToUnload->OnLevelHidden.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelHidden);
907 }
908
910 {
911 Definition->OnLevelUnloaded();
912 }
913 else
914 {
915 LOG_WARNING(LogCKLevel, "Failed to get previous %s.", NAMEOF(AUStageFlowDefinition));
916 }
917
918 if (LevelToUnload.IsValid())
919 {
920 LevelToUnload->SetShouldBeLoaded(false);
921 }
922}
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ HandleLevelLoading()

void ULevelStreamingSubsystem::HandleLevelLoading ( const ULevelStreamingData ReqLevelStreamingData,
ULevelStreaming *  TargetLevel 
)
private
476{
477 bool bAlreadyLoaded = false;
478 bool bResolved = false;
479
480 if (TargetLevel == nullptr)
481 {
482 TargetLevel = FLevelStreamingUtility::ResolveTargetLevel(this, ReqLevelStreamingData->TargetMap.PrimaryAssetName, bAlreadyLoaded, bResolved);
483 }
484 else
485 {
486 bAlreadyLoaded = TargetLevel->IsLevelLoaded();
487 bResolved = true;
488 }
489
490 const FString TargetLevelName = bResolved ? TargetLevel->GetWorldAsset().GetAssetName() : ReqLevelStreamingData->TargetMap.PrimaryAssetName.ToString();
491 ensureMsgf(bResolved && TargetLevel, TEXT("Failed to resolve level '%s'"), *TargetLevelName);
492
493 if (TargetLevel == nullptr)
494 {
495 return;
496 }
497
498 LevelToLoad = TargetLevel;
499
500 if (bAlreadyLoaded)
501 {
503 LOG_INFO(LogCKLevel, "[HandleLevelLoading] Reuse already loaded: '%s'", *TargetLevelName);
505 return;
506 }
507
509 LevelToLoad->OnLevelLoaded.AddUniqueDynamic(this, &ULevelStreamingSubsystem::OnLevelLoaded);
510 LOG_INFO(LogCKLevel, "[HandleLevelLoading] Async load prepared: '%s'", *TargetLevelName);
511}
FPrimaryAssetId TargetMap
Definition LevelStreamingData.h:44
void NotifyAsyncLoadCompleted()
Definition LevelStreamingStageMachine.cpp:27
static ULevelStreaming * ResolveTargetLevel(UObject *WorldContextObject, FName LevelName, bool &bOutAlreadyLoaded, bool &bOutSuccess)
Definition LevelStreamingSubsystem.cpp:92
static void PrepareLevelForLoad(ULevelStreaming *StreamingLevel, bool bShouldBeLoaded)
Definition LevelStreamingSubsystem.cpp:80
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ HandleLevelShown()

void ULevelStreamingSubsystem::HandleLevelShown ( )
private
836{
837 if (LevelToLoad.IsValid())
838 {
839 LOG_INFO(LogCKLevel, "'%s' is shown.", *LevelToLoad->GetWorldAsset().GetAssetName());
840 LevelToLoad->OnLevelShown.RemoveDynamic(this, &ULevelStreamingSubsystem::OnLevelShown);
841 }
842 else
843 {
844 LOG_ERROR(LogCKLevel, "Failed to find level to show.");
845 }
846}
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ Initialize()

void ULevelStreamingSubsystem::Initialize ( FSubsystemCollectionBase &  Collection)
overridevirtual
330{
331 Super::Initialize(Collection);
332
333 BundleRegistry = GetGameInstance()->GetSubsystem<UDataBundleRegistry>();
337
338 if (BundleRegistry == nullptr)
339 {
340 LOG_ERROR(LogCKAsset, "%s is null.", NAMEOF(UDataBundleRegistry));
341 return;
342 }
343
344 BundleRegistry->RequestLoad(TAG_BUNDLE_INITIAL, [this](UDataBundleDefinition*)
345 {
348 });
349
350 LOG_INFO(LogCK, "%s initialized successfully.", NAMEOF(ULevelStreamingSubsystem));
351}
Definition DataBundleDefinition.h:29
DataBundle의 로드/언로드를 관리하는 GameInstance 서브시스템.
Definition DataBundleRegistry.h:42
bool CacheStreamingDataFromStageDictionary()
Definition LevelStreamingSubsystem.cpp:664
void Initialize(ULevelStreamingSubsystem *LevelStreamingSubsystem)
Definition LevelStreamingStageMachine.cpp:6
void Initialize(ULevelStreamingSubsystem *InOwner)
Definition LevelStreamingSubsystem.cpp:122
void TryInitializeCurrentStage()
Definition LevelStreamingSubsystem.cpp:140
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ InvalidateLevelLoadRequest()

bool ULevelStreamingSubsystem::InvalidateLevelLoadRequest ( const ULevelStreamingData ReqLevelLoadPipelineData,
ULevelStreaming *&  PreviousLevelStreaming 
) const
private
515{
516 if (ReqLevelLoadPipelineData == nullptr)
517 {
518 LOG_ERROR(LogCKLevel, "%s is null", NAMEOF(ULevelStreamingData));
519 return true;
520 }
521
523 {
524 LOG_ERROR(LogCKLevel, "A level load is already in progress.");
525 return true;
526 }
527
528 PreviousLevelStreaming = FLevelStreamingUtility::FindVisible(GetWorld());
529
530 if (PreviousLevelStreaming == nullptr)
531 {
532 LOG_ERROR(LogCKLevel, "Failed to find currently visible streaming level.");
533 return true;
534 }
535
536 return false;
537}
FORCEINLINE ELevelStreamingFlowState GetState() const
Definition LevelStreamingStateMachine.h:29
static ULevelStreaming * FindVisible(const UWorld *World)
Definition LevelStreamingSubsystem.cpp:33
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ IsInitialStageInitialized()

FORCEINLINE bool ULevelStreamingSubsystem::IsInitialStageInitialized ( ) const
inline
88 {
90 }
bool IsInitializedForCurrentWorld() const
Definition LevelStreamingSubsystem.cpp:266

◆ IsLaunchedFromPersistentLevel()

FORCEINLINE bool ULevelStreamingSubsystem::IsLaunchedFromPersistentLevel ( ) const
inline
68 {
69 return GetWorld() && !GetWorld()->GetStreamingLevels().IsEmpty();
70 }
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ IsLevelLoadRequested()

FORCEINLINE bool ULevelStreamingSubsystem::IsLevelLoadRequested ( ) const
inline
83 {
85 }
FORCEINLINE bool IsBusy() const
Definition LevelStreamingStateMachine.h:24
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ IsTickable()

bool ULevelStreamingSubsystem::IsTickable ( ) const
overridevirtual
398{
399 return ChainExecutor.IsActive() && FTickableGameObject::IsTickable();
400}
bool IsActive() const
체인이 현재 실행 중인지 여부를 반환합니다.
Definition LevelStreamingEffect.h:66
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ NotifyLevelLoaded()

void ULevelStreamingSubsystem::NotifyLevelLoaded ( ULevelStreamingData StreamingData) const
private
592{
593 if (StreamingData == nullptr)
594 {
595 LOG_WARNING(LogCKLevel, "Level streaming data is null.");
596 return;
597 }
598
599 FTimerManager& Manager = GetWorld()->GetTimerManager();
600
601 Manager.SetTimerForNextTick([this, StreamingData]()
602 {
603 OnLevelLoadedInMemory.Broadcast(StreamingData);
604 });
605}
FOnLevelLoadedInMemory OnLevelLoadedInMemory
Definition LevelStreamingSubsystem.h:119
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnLevelHidden()

void ULevelStreamingSubsystem::OnLevelHidden ( )
431{
433}
void HandleLevelHidden()
Definition LevelStreamingSubsystem.cpp:902
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnLevelLoaded()

void ULevelStreamingSubsystem::OnLevelLoaded ( )
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnLevelShown()

void ULevelStreamingSubsystem::OnLevelShown ( )
425{
427}
void NotifyLevelShown()
Definition LevelStreamingStageMachine.cpp:53
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ PlacePlayerInLevel()

void ULevelStreamingSubsystem::PlacePlayerInLevel ( )
850{
851 UWorld* World = GetWorld();
852
853 if (World == nullptr)
854 {
855 LOG_ERROR(LogCKLevel, "World is null.");
856 return;
857 }
858
859 ULevel* LoadedLevel = LevelToLoad.IsValid() ? LevelToLoad->GetLoadedLevel() : nullptr;
860 const bool bUseCurrentLevel = LoadedLevel == nullptr;
861
862 if (LoadedLevel == nullptr)
863 {
864 LoadedLevel = World->GetCurrentLevel();
865 }
866
867 if (LevelStreamingData == nullptr)
868 {
869 LOG_ERROR(LogCKLevel, "%s is null.", NAMEOF(ULevelStreamingData));
870 return;
871 }
872
873 if (LevelStreamingData->PlayerPlacer == nullptr)
874 {
875 return;
876 }
877
878 ActivePlayerPlacer = LevelStreamingData->CreatePlayerPlacer(this);
879
880 if (ActivePlayerPlacer == nullptr)
881 {
882 return;
883 }
884
885 TWeakObjectPtr<ULevelPlayerPlacer> PlacementPlacer = ActivePlayerPlacer;
886
887 auto BroadcastPlacement = [this, PlacementPlacer]
888 {
889 if (LevelToLoad.IsValid() == false || PlacementPlacer.IsValid() == false)
890 {
891 return;
892 }
893
894 OnPlacePlayerTheWorld.Broadcast(PlacementPlacer.Get(), LevelToLoad->GetWorld());
895 };
896
897 GetWorld()->GetTimerManager().SetTimerForNextTick(BroadcastPlacement);
898 ActivePlayerPlacer->PlacePlayer(LoadedLevel, LevelStreamingData->TargetMap);
899}
FOnPlacePlayerTheWorld OnPlacePlayerTheWorld
Definition LevelStreamingSubsystem.h:122

◆ PreloadNiagaraEffectsAsync()

void ULevelStreamingSubsystem::PreloadNiagaraEffectsAsync ( TWeakObjectPtr< ULevelStreamingData RequestedStreamingData)
private
609{
610 ULevelStreamingData* StreamingData = RequestedStreamingData.Get();
611
612 if (StreamingData == nullptr || StreamingData->LevelRule == nullptr)
613 {
614 return;
615 }
616
617 UNiagaraCachingFlowDefinition* NiagaraCachingFlow = StreamingData->LevelRule->GetNiagaraCachingFlowDefinition();
618
619 if (NiagaraCachingFlow == nullptr)
620 {
621 return;
622 }
623
624 TArray<FSoftObjectPath> PathsToLoad;
625 NiagaraCachingFlow->GetCachedSystemPaths(PathsToLoad);
626
627 if (PathsToLoad.IsEmpty())
628 {
629 return;
630 }
631
632 // 에셋만 비동기 로드해두면, 로드 시점에 PSO precaching이 백그라운드에서 자동으로 셰이더/PSO를 컴파일한다.
633 // 핸들을 서브시스템에 보관해 세션 동안 로드 상태를 유지(스테이지 전환 후에도 재사용)한다.
634 const int32 RequestedCount = PathsToLoad.Num();
635 LOG_INFO(LogCKAsset, "Niagara 프리로드 요청: %d개", RequestedCount);
636
637 FStreamableManager& Manager = UAssetManager::Get().GetStreamableManager();
638 NiagaraPreloadHandle = Manager.RequestAsyncLoad(PathsToLoad, FStreamableDelegate::CreateWeakLambda(this, [this, RequestedCount]()
639 {
640 int32 LoadedCount = 0;
641
642 if (NiagaraPreloadHandle.IsValid())
643 {
644 TArray<UObject*> LoadedAssets;
645 NiagaraPreloadHandle->GetLoadedAssets(LoadedAssets);
646 LoadedCount = LoadedAssets.Num();
647 }
648
649 LOG_INFO(LogCKAsset, "Niagara 프리로드 완료: %d/%d개 로드됨", LoadedCount, RequestedCount);
650 }));
651}
TObjectPtr< ULevelRuleData > LevelRule
Definition LevelStreamingData.h:50
TSharedPtr< FStreamableHandle > NiagaraPreloadHandle
Definition LevelStreamingSubsystem.h:177
Definition NiagaraCachingFlowDefinition.h:14
void GetCachedSystemPaths(TArray< FSoftObjectPath > &OutPaths) const
Definition NiagaraCachingFlowDefinition.cpp:16
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ ReleaseNiagaraEffectsPreload()

void ULevelStreamingSubsystem::ReleaseNiagaraEffectsPreload ( )
private
655{
656 if (NiagaraPreloadHandle.IsValid())
657 {
658 NiagaraPreloadHandle->ReleaseHandle();
659 NiagaraPreloadHandle.Reset();
660 }
661}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RequestLevelLoad()

void ULevelStreamingSubsystem::RequestLevelLoad ( ULevelStreamingData ReqLevelLoadPipelineData)
404{
405 ULevelStreaming* PreviousLevelStreaming = nullptr;
406
407 if (InvalidateLevelLoadRequest(ReqLevelLoadPipelineData, PreviousLevelStreaming))
408 {
409 return;
410 }
411
412 LevelStreamingData = ReqLevelLoadPipelineData;
413 LevelToUnload = PreviousLevelStreaming;
415}
bool InvalidateLevelLoadRequest(const ULevelStreamingData *ReqLevelLoadPipelineData, ULevelStreaming *&PreviousLevelStreaming) const
Definition LevelStreamingSubsystem.cpp:514
void BeginLoad()
Definition LevelStreamingStageMachine.cpp:19
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ StartChain()

void ULevelStreamingSubsystem::StartChain ( ELevelStreamingPhase  Phase)
private
541{
542 auto ContextFactory = [this]()
543 {
545 };
546
547 auto OnCompleted = [this](const ELevelStreamingPhase CompletedPhase)
548 {
550 };
551
552 ChainExecutor.Start(Phase, MoveTemp(ContextFactory), MoveTemp(OnCompleted), false);
553}
ELevelStreamingPhase
Definition ELevelStreamingEnums.h:7
void Start(ELevelStreamingPhase InPhase, FContextFactory InContextFactory, FOnChainCompleted InOnCompleted, bool bInDebugMode=false)
이펙트 체인 실행을 시작합니다.
Definition LevelStreamingEffect.cpp:49
static FLevelStreamingContext CreateContext(TWeakObjectPtr< ULevelStreaming > InOriginalWorld, TWeakObjectPtr< ULevelStreaming > InTargetWorld, const FEffectChainExecutor &Executor)
Definition LevelStreamingContext.h:50
void NotifyPhaseCompleted(ELevelStreamingPhase Phase)
Definition LevelStreamingStageMachine.cpp:145
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ Tick()

void ULevelStreamingSubsystem::Tick ( float  DeltaTime)
overridevirtual
392{
393 ChainExecutor.Tick(DeltaTime);
394}
void Tick(float DeltaTime)
현재 이펙트를 틱합니다. 완료 시 End 이벤트를 호출하고 다음 이펙트로 진행합니다.
Definition LevelStreamingEffect.cpp:71
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

Friend, 그리고 관련된 함수 문서화

◆ FLevelStreamingStateMachine

friend struct FLevelStreamingStateMachine
friend

멤버 데이터 문서화

◆ ActivePlayerPlacer

TObjectPtr<ULevelPlayerPlacer> ULevelStreamingSubsystem::ActivePlayerPlacer
private

◆ AllRegisteredEffects

TArray<TObjectPtr<ULevelStreamingEffect> > ULevelStreamingSubsystem::AllRegisteredEffects
private

◆ BundleRegistry

TObjectPtr<UDataBundleRegistry> ULevelStreamingSubsystem::BundleRegistry
private

◆ CachedStageDictionary

TObjectPtr<UStageDictionary> ULevelStreamingSubsystem::CachedStageDictionary
private

◆ ChainExecutor

FEffectChainExecutor ULevelStreamingSubsystem::ChainExecutor
private

◆ InitialStageBootstrap

FInitialStageBootstrapper ULevelStreamingSubsystem::InitialStageBootstrap
private

◆ LevelStreamingData

TObjectPtr<ULevelStreamingData> ULevelStreamingSubsystem::LevelStreamingData
private

◆ LevelToLoad

TWeakObjectPtr<ULevelStreaming> ULevelStreamingSubsystem::LevelToLoad
private

◆ LevelToUnload

TWeakObjectPtr<ULevelStreaming> ULevelStreamingSubsystem::LevelToUnload
private

◆ NiagaraPreloadHandle

TSharedPtr<FStreamableHandle> ULevelStreamingSubsystem::NiagaraPreloadHandle
private

◆ OnLevelLoadCompleted

FOnLevelLoadCompleted ULevelStreamingSubsystem::OnLevelLoadCompleted

◆ OnLevelLoadedInMemory

FOnLevelLoadedInMemory ULevelStreamingSubsystem::OnLevelLoadedInMemory

◆ OnPlacePlayerTheWorld

FOnPlacePlayerTheWorld ULevelStreamingSubsystem::OnPlacePlayerTheWorld

◆ StreamingStateMachine

FLevelStreamingStateMachine ULevelStreamingSubsystem::StreamingStateMachine
private

이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: