UWorldComposition

WorldComposition represents world structure:

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/WorldComposition.h

Include

#include "Engine/WorldComposition.h"

Syntax

class UWorldComposition : public UObject

Remarks

WorldComposition represents world structure:

  • Holds list of all level packages participating in this world and theirs base parameters (bounding boxes, offset from origin)

  • Holds list of streaming level objects to stream in and out based on distance from current view point

  • Handles properly levels repositioning during level loading and saving

Variables

Name Description

Public variable

bool

 

bLoadAllTilesDuringCinematic

Whether all distance dependent tiles should be loaded and visible during cinematic.

Public variable

bool

 

bLockTilesLocation

Whether all tiles locations are locked.

Public variable

bool

 

bRebaseOriginIn3DSpace

Whether to rebase origin in 3D space, otherwise only on XY plane.

Public variable

bool

 

bTemporallyDisableOriginTracking

Hack for a World Browser to be able to temporally show hidden levels regardless of current world origin and without offsetting them temporally

Public variable

float

 

RebaseOriginDistance

Maximum distance to current view point where we should initiate origin rebasing.

Public variable

TArray < ULevelS ...

 

TilesStreaming

Streaming level objects for each tile.

Public variable

double

 

TilesStreamingTimeThreshold

Time threshold between tile streaming state changes.

Constructors

Name Description

Public function

UWorldComposition

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function

void

 

CollectTilesToCook

(
    TArray < FString >& PackageNames
)

Collect tiles package names to cook

Public function Const

bool

 

DoesTileExists

(
    const FName & TilePackageName
)

Public function

void

 

EvaluateWorldOriginLocation

(
    const FVector & ViewLocation
)

Evaluates current world origin location against provided view location Issues request for world origin rebasing in case location is far enough from current origin

Public function Const

void

 

GetDistanceVisibleLevels

(
    const FVector * InLocations,
    int32 Num,
    TArray < FDistanceVisibleLevel >& O...,
    TArray < FDistanceVisibleLevel >& O...
)

Returns currently visible and hidden levels based on distance based streaming

Public function Const

void

 

GetDistanceVisibleLevels

(
    const FVector & InLocation,
    TArray < FDistanceVisibleLevel >& O...,
    TArray < FDistanceVisibleLevel >& O...
)

Returns currently visible and hidden levels based on distance based streaming

Public function Const

FBox

 

GetLevelBounds

(
    ULevel * InLevel
)

Public function Const

FIntVector

 

GetLevelOffset

(
    ULevel * InLevel
)

Public function Const

FWorldTileIn ...

 

GetTileInfo

(
    const FName & InPackageName
)

Public function

FTilesList &

 

GetTilesList()

Public function Const

UWorld *

 

GetWorld()

Public function Const

FString

 

GetWorldRoot()

Public function Const

bool

 

IsDistanceDependentLevel

(
    FName PackageName
)

Public function

void

 

OnLevelAddedToWorld

(
    ULevel * InLevel
)

Handles level is being added to world

Public function Static

void

 

OnLevelPostLoad

(
    ULevel * InLevel
)

Handles level OnPostLoad event

Public function

void

 

OnLevelPostSave

(
    ULevel * InLevel
)

Handles level just after it was saved to disk

Public function

void

 

OnLevelPreSave

(
    ULevel * InLevel
)

Handles level just before it going to be saved to disk

Public function

void

 

OnLevelRemovedFromWorld

(
    ULevel * InLevel
)

Handles level is being removed from the world

Public function

void

 

OnTileInfoUpdated

(
    const FName & InPackageName,
    const FWorldTileInfo & InInfo
)

Notification from World browser about changes in tile info structure

Public function

void

 

ReinitializeForPIE()

Public function

void

 

Rescan()

Scans world root folder for relevant packages and initializes world composition structures

Public function

void

 

RestoreDirtyTilesInfo

(
    const FTilesList & TilesPrevState
)

Restores dirty tiles information after world composition being rescanned

Public function

bool

 

UpdateEditorStreamingState

(
    const FVector & InLocation
)

Simulates streaming in editor world, only visibility, no loading/unloading, no LOD sub-levels

Public function

void

 

UpdateStreamingState

(
    const FVector & InLocation
)

Adds or removes level streaming objects to world based on distance settings from current view point

Public function

void

 

UpdateStreamingState()

Adds or removes level streaming objects to world based on distance settings from players current view

Public function

void

 

UpdateStreamingState

(
    const FVector * InLocation,
    int32 Num
)

Adds or removes level streaming objects to world based on distance settings from players current view

Public function

void

 

UpdateStreamingStateCinematic

(
    const FVector * InLocation,
    int32 Num
)

Adds or removes level streaming objects to world based on distance settings from players current view

Typedefs

Name

Description

FEnableWorldCompositionEvent

Event to enable/disable world composition in the world.

FTilesList

FWorldCompositionChangedEvent

Event when world composition was successfully enabled/disabled in the world.

Constants

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback