5#include "CoreMinimal.h"
7#include "Engine/DataTable.h"
8#include "StreamingLevelManager.generated.h"
17 UPROPERTY(EditAnywhere, BlueprintReadOnly)
19 UPROPERTY(EditAnywhere, BlueprintReadOnly)
21 UPROPERTY(EditAnywhere, BlueprintReadWrite)
23 UPROPERTY(EditAnywhere, BlueprintReadWrite)
46 UFUNCTION(BlueprintCallable, Category = "LevelStreamingManager")
47 TArray<FName> GetLevelsBasedOnStep(FText
StepName);
55 UFUNCTION(BlueprintCallable, Category = "LevelStreamingManager")
56 void LoadStreamingLevels(TArray<FName> levelsToLoad,
bool onlyFadeOut = false,
float FadeTime = 0.5f);
65 UFUNCTION(BlueprintCallable, Category = "LevelStreamingManager")
66 void LoadStreamingLevelsAndTeleportPlayer(TArray<FName> Levels, FTransform PlayerTransform,
bool OnlyFadeOut = false,
float FadeTime = 0.5f);
68 UFUNCTION(BlueprintCallable, Category = "LevelStreamingManager")
69 void SetLevelsVisibility(TArray<FName> Levels,
bool Visible);
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LevelStreamingManager")
72 UDataTable* LevelStreamingDataTable;
74 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "LevelStreamingManager")
75 TArray<FName> LoadedLevels;
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LevelStreamingManager")
78 bool AutoFadeInAndOut = true;
86 UFUNCTION(BlueprintCallable, Category = "LevelStreamingManager")
87 void FilteredArraysToLoadUnload(TArray<FName> levelsToLoad);
97 void UnloadStreamingLevels(int32 IndexToUnload);
102 void LoadStreamingLevels(int32 IndexToLoad);
104 TArray<FName> LevelsToLoad;
105 TArray<FName> LevelsToUnload;
107 int32 UnloadingIndex;
110 FTransform PlayerNewTransform;
#define DECLARE_EVENT_HANDLER(TEvent)
It provides functionalities for handling events, sending events, and managing a private owner....
Event called when new step is loaded.
Event called when new story is loaded.
Manager that provides functionality for managing streaming levels. Two options to use this class:
DECLARE_EVENT_HANDLER(UNewStoryLoadedEvent)
DECLARE_EVENT_HANDLER(UNewStepLoadedEvent)
TArray< FName > LevelsToLoad
Array storing the levels to load.
TArray< FName > LoadedLevels
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "LevelStreamingManager")
TArray< FName > LevelsToUnload
Array storing the levels to unload.
UDataTable * LevelStreamingDataTable
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "LevelStreamingManager")
int32 LoadingIndex
Index for tracking the loading progress.
FTransform PlayerNewTransform
Transform representing the new location for the player after loading levels.
int32 UnloadingIndex
Index for tracking the unloading progress.
float TimeForFades
Time duration for fade effects.
Structure representing streaming levels to load based on step. Also contains info about new player po...
bool TeleportPlayerToSpecificLocation
UPROPERTY(EditAnywhere, BlueprintReadWrite)
TArray< FName > ActiveLevels
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FText StepName
UPROPERTY(EditAnywhere, BlueprintReadOnly)
FTransform PlayerNewLocation
UPROPERTY(EditAnywhere, BlueprintReadWrite)