UWorldSubsystem

[UWorldSubsystem](API\Runtime\Engine\Subsystems\UWorldSubsystem) Base class for auto instanced and initialized systems that share the lifetime of a [UWorld](API\Runtime\Engine\Engine\UWorld)

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/Subsystems/WorldSubsystem.h

Include

#include "Subsystems/WorldSubsystem.h"

Syntax

class UWorldSubsystem : public USubsystem

Remarks

UWorldSubsystem Base class for auto instanced and initialized systems that share the lifetime of a UWorld

Constructors

Name Description

Public function

UWorldSubsystem()

Functions

Name Description

Protected function Virtual Const

bool

 

DoesSupportWorldType

(
    const EWorldType::Type WorldType
)

Public function Virtual Const

UWorld *

 

GetWorld()

Public function Const

UWorld &

 

GetWorldRef()

Returns a reference to the UWorld this subsystem is contained within.

Public function Virtual

void

 

OnWorldBeginPlay

(
    UWorld& InWorld
)

Called when world is ready to start gameplay before the game mode transitions to the correct state and call BeginPlay on all actors

Public function Virtual

void

 

OnWorldComponentsUpdated

(
    UWorld& World
)

Called after world components (e.g. line batcher and all level components) have been updated

Public function Virtual

void

 

PostInitialize()

Called once all UWorldSubsystems have been initialized

Public function Virtual

void

 

UpdateStreamingState()

Updates sub-system required streaming levels (called by world's UpdateStreamingState function)

Overridden from USubsystem

Name Description

Public function Virtual Const

bool

 

ShouldCreateSubsystem

(
    UObject* Outer
)

Override to control if the Subsystem should be created at all.