UMassLODManager

Manager responsible to manage and synchronized available viewers

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

MassLOD

Header

/Engine/Plugins/Runtime/MassGameplay/Source/MassLOD/Public/MassLODManager.h

Include

#include "MassLODManager.h"

Syntax

UCLASS()
class UMassLODManager : public UTickableWorldSubsystem

Remarks

Manager responsible to manage and synchronized available viewers

Functions

Name Description

Protected function

void

 

AddViewer

(
    APlayerController* PlayerContr...,
    FName StreamingSourceName
)

Adds a viewer to the list and sends notification about addition

Protected function

uint32

 

GetNextViewerSerialNumber()

Returns the next new viewer serial number

Public function

FOnViewerAdd...

 

GetOnViewerAddedDelegate()

Returns the delegate called when new viewer are added to the list

Public function

FOnViewerRem...

 

GetOnViewerRemovedDelegate()

Returns the delegate called when viewer are removed from the list

Public function Const

APlayerContr...

 

GetPlayerControllerFromViewerHandle

(
    const FMassViewerHandle& ViewerHan...
)

Returns PlayerController pointer from the viewer handle

Public function

const TArray...

 

GetSynchronizedViewers()

Synchronize the viewers if not done this frame and returns the updated array

Public function Const

int32

 

GetValidViewerIdx

(
    const FMassViewerHandle& ViewerHan...
)

Returns the index of the viewer if valid, otherwise INDEX_NONE is return

Public function Const

FMassViewerH...

 

GetViewerHandleFromPlayerController

(
    const APlayerController* Playe...
)

Returns viewer handle from the PlayerController pointer

Public function Const

FMassViewerH...

 

GetViewerHandleFromStreamingSource

(
    const FName StreamingSourceName
)

Returns viewer handle from the streaming source name

Public function Const

const TArray...

 

GetViewers()

Returns the array of viewers

Public function Const

bool

 

IsValidViewer

(
    const FMassViewerHandle& ViewerHan...
)

Checks the validity of a viewer handle

Protected function UFunction

void

 

OnPlayerControllerEndPlay

(
    AActor* Actor,
    EEndPlayReason::Type EndPlayReason
)

Player controller EndPlay callback, removing viewers from the list

Protected function

void

 

OnPrePhysicsPhaseStarted

(
    float DeltaTime
)

Called at the start of the PrePhysics mass processing phase and calls SynchronizeViewers

Protected function

void

 

RemoveViewer

(
    const FMassViewerHandle& ViewerHan...
)

Removes a viewer to the list and send notification about removal

Protected function

void

 

SynchronizeViewers()

Synchronizes the viewers from the engine PlayerController list

Overridden from USubsystem

Name Description

Protected function Virtual

void

 

Deinitialize()

Implement this for deinitialization of instances of the system

Protected function Virtual

void

 

Initialize

(
    FSubsystemCollectionBase& Collecti...
)

USubsystem implementation Begin.

Overridden from FTickableObjectBase

Name Description

Protected function Virtual Const

TStatId

 

GetStatId()

Return the stat id to use for this tickable