Struct WorldContext
FWorldContext A context for dealing with UWorlds at the engine level.
Inherited Members
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public struct WorldContext
Remarks
As the engine brings up and destroys world, we need a way to keep straight what world belongs to what.
WorldContexts can be thought of as a track. By default we have 1 track that we load and unload levels on. Adding a second context is adding a second track; another track of progression for worlds to live on.
For the GameEngine, there will be one WorldContext until we decide to support multiple simultaneous worlds. For the EditorEngine, there may be one WorldContext for the EditorWorld and one for the PIE World.
FWorldContext provides both a way to manage 'the current PIE UWorld*' as well as state that goes along with connecting/travelling to new worlds.
FWorldContext should remain internal to the UEngine classes. Outside code should not keep pointers or try to manage FWorldContexts directly. Outside code can still deal with UWorld*, and pass UWorlds into Engine level functions. The Engine code can look up the relevant context for a given UWorld.
For convenience, FWorldContext can maintain outside pointers to UWorlds. For example, PIE can tie UWorld UEditorEngine::PlayWorld to the PIE world context. If the PIE UWorld changes, the UEditorEngine::PlayWorld pointer will be automatically updated. This is done with AddRef() and SetCurrentWorld().
Properties
| Improve this Doc View SourceGameViewport
Game Viewport
Declaration
public GameViewportClient GameViewport { get; set; }
Property Value
Type | Description |
---|---|
GameViewportClient |
OwningGameInstance
Owning Game Instance
Declaration
public GameInstance OwningGameInstance { get; set; }
Property Value
Type | Description |
---|---|
GameInstance |
PendingNetGame
Pending Net Game
Declaration
public PendingNetGame PendingNetGame { get; set; }
Property Value
Type | Description |
---|---|
PendingNetGame |