Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- ULevelStreaming
- ULevelStreamingAlwaysLoaded
- ULevelStreamingLevelInstanceEditor
- ULevelStreamingDynamic
- ULevelStreamingLevelInstance
- UWorldPartitionLevelStreamingDynamic
- ULevelStreamingPersistent
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/LevelStreaming.h |
Include | #include "Engine/LevelStreaming.h" |
Syntax
class ULevelStreaming : public UObject
Remarks
Abstract base class of container object encapsulating data required for streaming and providing interface for when a level should be streamed in and out of memory.
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
bool | bClientOnlyVisible | Applied to LoadedLevel |
![]() |
uint8: 1 | bDisableDistanceStreaming | Whether this level streaming object should be ignored by world composition distance streaming, so streaming state can be controlled by other systems (ex: in blueprints) |
![]() |
uint8: 1 | bDrawOnLevelStatusMap | If true, will be drawn on the 'level streaming status' map (STAT LEVELMAP console command) |
![]() |
uint8: 1 | bGarbageCollectionClusteringEnabled | If true, allows garbage collection clustering for the level. |
![]() |
uint8: 1 | bIsStatic | Whether this level only contains static actors that aren't affected by gameplay or replication. |
![]() |
uint8: 1 | bLocked | Whether this level is locked; that is, its actors are read-only. |
![]() |
uint8: 1 | bShouldBeLoaded | Whether the level should be loaded |
![]() |
uint8: 1 | bShouldBlockOnLoad | Whether we want to force a blocking load |
![]() |
uint8: 1 | bShouldBlockOnUnload | Whether we want to force a blocking unload |
![]() |
uint8: 1 | bSkipClientUseMakingInvisibleTransactionRequest | Whether the streaming level can safely skip making invisible transaction request from the client to the server |
![]() |
uint8: 1 | bSkipClientUseMakingVisibleTransactionRequest | Whether the streaming level can safely skip making visible transaction request from the client to the server |
![]() |
TArray< TObjectPtr< ALevelStreamingVolume > > | EditorStreamingVolumes | The level streaming volumes bound to this level. |
![]() |
ECurrentState | FailedToLoad | |
![]() |
TArray< FString > | Keywords | List of keywords to filter on in the level browser |
![]() |
float | LastVolumeUnloadRequestTime | Time of last volume unload request. Used in preventing spurious unload requests. |
![]() |
FLinearColor | LevelColor | The level color used for visualization. (Show -> Advanced -> Level Coloration) |
![]() |
FTransform | LevelTransform | Transform applied to actors after loading. |
![]() |
TObjectPtr< class ULevel > | LoadedLevel | Pointer to Level object if currently loaded/ streamed in. |
![]() |
ECurrentState | LoadedNotVisible | |
![]() |
ECurrentState | LoadedVisible | |
![]() |
ECurrentState | Loading | |
![]() |
TArray< FName > | LODPackageNames | LOD versions of this level |
![]() |
TArray< FName > | LODPackageNamesToLoad | LOD package names on disk |
![]() |
ECurrentState | MakingInvisible | |
![]() |
ECurrentState | MakingVisible | |
![]() |
float | MinTimeBetweenVolumeUnloadRequests | Cooldown time in seconds between volume-based unload requests. |
![]() |
FLevelStreamingVisibilityStatus | OnLevelHidden | Called when level is no longer visible, may not be removed from world yet |
![]() |
FLevelStreamingLoadedStatus | OnLevelLoaded | Called when level is streamed in |
![]() |
FLevelStreamingVisibilityStatus | OnLevelShown | Called when level is added to the world and is visible |
![]() |
FLevelStreamingLoadedStatus | OnLevelUnloaded | Called when level is streamed out |
![]() |
FName | PackageNameToLoad | If this isn't Name_None, then we load from this package on disk to the new package named PackageName |
![]() |
TObjectPtr< class ULevel > | PendingUnloadLevel | Pointer to a Level object that was previously active and was replaced with a new LoadedLevel (for LOD switching) |
![]() |
int32 | StreamingPriority | The relative priority of considering the streaming level. |
![]() |
ECurrentState | Unloaded | |
![]() |
TSoftObjectPtr< UWorld > | WorldAsset | The reference to the world containing the level to load |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
ULevelStreaming
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | ||
![]() |
void | BeginClientNetVisibilityRequest
(
bool bInShouldBeVisible |
Begin a client instigated NetVisibility request |
![]() ![]() |
void | BroadcastLevelLoadedStatus
(
UWorld* PersistentWorld, |
Traverses all streaming level objects in the persistent world and in all inner worlds and calls appropriate delegate for streaming objects that refer specified level |
![]() ![]() |
void | BroadcastLevelVisibleStatus
(
UWorld* PersistentWorld, |
Traverses all streaming level objects in the persistent world and in all inner worlds and calls appropriate delegate for streaming objects that refer specified level |
![]() |
bool | Returns whether the streaming level can make invisible (can call RemoveFromWorld). | |
![]() |
bool | Returns whether the streaming level can make visible (can call AddToWorld). | |
![]() ![]() ![]() |
bool | Returns whether level status can be replicated from the server to the client | |
![]() |
void | Sets the LoadedLevel value to NULL | |
![]() |
ULevelStreaming * | CreateInstance
(
const FString& UniqueInstanceName |
Creates a new instance of this streaming level with a provided unique instance name |
![]() ![]() |
void | DebugDrawLegend
(
const UWorld* World, |
Utility that draws a legend of level streaming status |
![]() ![]() |
bool | Whether client should be using making invisible transaction requests to the server (default value). | |
![]() ![]() |
bool | Whether client should be using making visible transaction requests to the server (default value). | |
![]() ![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGS const TCHAR * | EnumToString
(
ECurrentState InCurrentState |
|
![]() ![]() |
ULevelStreaming * | FindStreamingLevel
(
const ULevel* Level |
|
![]() ![]() |
const FName & | Get the folder path for this level for use in the world browser. Only available in editor builds | |
![]() ![]() ![]() |
TOptional< FFolder::FRootObject > | ||
![]() ![]() |
bool | Returns if the streaming level has requested to be unloaded and removed. | |
![]() ![]() |
int32 | Returns the world composition level LOD index. | |
![]() |
ALevelScriptActor * | Returns the Level Script Actor of the level if the level is loaded and valid | |
![]() ![]() |
ELevelStreamingState | ||
![]() ![]() |
EStreamingStatus | Used for debugging Level's status | |
![]() ![]() |
FColor | GetLevelStreamingStatusColor
(
EStreamingStatus Status |
Utility that gets a color for a particular level status |
![]() ![]() |
const TCHAR * | GetLevelStreamingStatusDisplayName
(
EStreamingStatus Status |
Utility that returns a string for a streaming level status |
![]() ![]() |
ULevel * | Gets a pointer to the LoadedLevel value | |
![]() ![]() |
FName | ||
![]() ![]() |
int32 | GetPriority () |
Sets the relative priority of considering the streaming level. |
![]() ![]() |
bool | Returns the value of bShouldBeVisible. | |
![]() ![]() |
bool | Returns if the streaming level should be visible in the editor. | |
![]() |
FBox | Get a bounding box around the streaming volumes associated with this LevelStreaming object | |
![]() ![]() ![]() |
UWorld * | Returns the UWorld that triggered the streaming of this streaming level. | |
![]() ![]() ![]() |
UWorld * | GetWorld () |
|
![]() ![]() |
const TSoftObjectPtr< UWorld > & | Returns a constant reference to the world asset this streaming level object references | |
![]() ![]() ![]() |
FName | Gets the package name for the world asset referred to by this level streaming as an FName | |
![]() ![]() |
FString | Gets the package name for the world asset referred to by this level streaming | |
![]() ![]() ![]() |
const IWorldPartitionCell * | ||
![]() ![]() |
bool | Returns whether the streaming level has loaded a level. | |
![]() ![]() |
bool | Returns whether the streaming level is in the loading state. | |
![]() ![]() |
bool | Returns whether streaming level is loaded | |
![]() ![]() |
bool | Returns whether streaming level is visible | |
![]() ![]() |
bool | Returns whether level has streaming state change pending | |
![]() ![]() ![]() |
bool | Returns if the streaming level can be modified by user | |
![]() ![]() |
bool | Returns false if the level package associated to that streaming level is invalid. | |
![]() ![]() |
bool | IsWaitingForNetVisibilityTransactionAck
(
ENetLevelVisibilityRequest InRequestType |
Check if we are waiting for a making visible or invisible streaming transaction |
![]() ![]() |
void | OnLevelLoadedChanged
(
ULevel* Level |
Called by SetLoadedLevel |
![]() |
void | ||
![]() |
void | ||
![]() |
void | PrepareLoadedLevel
(
ULevel* InLevel, |
Sets loaded level, fixups for PIE, notifies level is loaded, apply necessary modifications on level once loaded. |
![]() ![]() |
void | RemoveLevelAnnotation
(
const ULevel* Level |
|
![]() |
void | After a sub level is reloaded in the editor the cache state needs to be refreshed. | |
![]() |
void | Remove duplicates in EditorStreamingVolumes list | |
![]() |
void | RenameForPIE
(
int PIEInstanceID, |
Rename package name to PIE appropriate name |
![]() ![]() |
bool | RequestLevel
(
UWorld* PersistentWorld, |
Try to find loaded level in memory, issue a loading request otherwise |
![]() ![]() |
bool | RequestVisibilityChange
(
bool bVisible |
Prepare the transition to the new state. |
![]() |
void | SetCurrentState
(
ELevelStreamingState NewState |
Updates the current state of the streaming level and notifies any observers. |
![]() |
void | SetFolderPath
(
const FName& InFolderPath |
Sets the folder path for this level in the world browser. Only available in editor builds |
![]() |
void | SetIsRequestingUnloadAndRemoval
(
bool bInIsRequestingUnloadAndRemoval |
Sets if the streaming level should be unloaded and removed. |
![]() |
void | SetLevelLODIndex
(
int32 LODIndex |
Sets the world composition level LOD index and marks the streaming level as requiring consideration. |
![]() ![]() |
void | SetLoadedLevel
(
ULevel* Level |
Sets the value of LoadedLevel |
![]() |
void | SetPriority
(
int32 NewPriority |
Sets the relative priority of considering the streaming level. |
![]() ![]() |
void | SetShouldBeLoaded
(
bool bInShouldBeLoaded |
Virtual that can be overridden to change whether a streaming level should be loaded. |
![]() |
void | SetShouldBeVisible
(
bool bInShouldBeVisible |
Sets the should be visible flag and marks the streaming level as requiring consideration. |
![]() |
void | SetShouldBeVisibleInEditor
(
bool bInShouldBeVisibleInEditor |
Sets if the streaming level should be visible in the editor. |
![]() ![]() |
void | SetWorldAsset
(
const TSoftObjectPtr< UWorld >& NewWorldAsset |
Setter for WorldAsset. |
![]() |
void | SetWorldAssetByPackageName
(
FName InPackageName |
Sets the world asset based on the package name assuming it contains a world of the same name. |
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | Return whether this level should be present in memory which in turn tells the streaming code to stream it in. | |
![]() ![]() ![]() |
bool | Return whether this level should be visible/ associated with the world if it is loaded. | |
![]() ![]() ![]() |
bool | ||
![]() ![]() ![]() |
bool | Returns whether level should start to render only when it will be fully added to the world or not. | |
![]() ![]() |
bool | ShouldReuseUnloadedButStillAroundLevels
(
const ULevel* InLevel |
If true level streaming can reuse an unloaded level that wasn't GC'd yet. |
![]() ![]() |
bool | If true server will wait for client acknowledgment before making treating streaming levels as visible for the client | |
![]() ![]() ![]() |
bool | Returns if the streaming level is visible in LevelCollectionModel | |
![]() |
void | UpdateNetVisibilityTransactionState
(
bool bInShouldBeVisible, |
Set the current state of the current visibility/streaming transaction |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally |
![]() ![]() |
void | PostEditUndo () |
Override Pre/PostEditUndo functions to handle editor transform |
![]() ![]() |
void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |
![]() ![]() |
void | Handles reading, writing, and reference collecting using FArchive. |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FLevelAnnotation | Annotation for fast inverse lookup. | |
![]() |
FPackageNameMatcher | Matcher for searching streaming levels by PackageName |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
EReqLevelBlock |
Constants
Name | Description |
---|---|
LevelAnnotations |
Deprecated Variables
Type | Name | Description | |
---|---|---|---|
![]() |
ECurrentState: uint8 { Removed = (uint8)ELevelStreamingState::Removed | pad0 | ULevelStreaming::ECurrentState has been replaced by ELevelStreamingState |
![]() |
FColor | DrawColor_DEPRECATED | Deprecated level color used for visualization. |
![]() |
FName | PackageName_DEPRECATED | Deprecated name of the package containing the level to load. |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
PRAGMA_DISABLE_DEPRECATION_WARNINGSECurrentState | ULevelStreaming::ECurrentState has been replaced by ELevelStreamingState. Use GetLevelStreamingState instead. |