Navigation
API > API/Plugins > API/Plugins/MassLOD
Inheritance Hierarchy
- UWorldSubsystem
- UMassSubsystemBase
- UMassLODSubsystem
References
| Module | MassLOD |
| Header | /Engine/Plugins/Runtime/MassGameplay/Source/MassLOD/Public/MassLODSubsystem.h |
| Include | #include "MassLODSubsystem.h" |
Syntax
UCLASS (Config=Mass, defaultconfig)
class UMassLODSubsystem : public UMassSubsystemBase
Remarks
Manager responsible to manage and synchronized available viewers
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint8: 1 = true | bAllowNonPlayerViwerActors | Whether using non-player actors as LOD Viewers is supported. | |
| uint8: 1 = true | bGatherPlayerControllers | If true, all PlayerControllers will be gathered as viewers for LOD calculations. | |
| uint8: 1 = true | bGatherStreamingSources | If true, all streaming sources will be gathered as viewers for LOD calculations. | |
| uint8: 1 = false | bUsePlayerPawnLocationInsteadOfCamera | If set to true will prefer to use Player-owned Pawn's location and rotation over Player's camera as the viewer's location and rotation. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddActorViewer
(
AActor& ActorViewer |
||
| void | AddEditorViewer
(
const int32 HashValue, |
Adds the editor viewport client (identified via an index) as a viewer to the list and sends notification about addition | |
| void | AddPlayerViewer
(
APlayerController& PlayerController |
Adds the given player as a viewer to the list and sends notification about addition | |
| void | AddStreamingSourceViewer
(
const FName StreamingSourceName |
Adds the given streaming source as a viewer to the list and sends notification about addition | |
| void | AddViewer
(
APlayerController* PlayerController, |
||
| uint32 | Returns the next new viewer serial number | ||
| FOnViewerAdded & | Returns the delegate called when new viewer are added to the list | ||
| FOnViewerRemoved & | Returns the delegate called when viewer are removed from the list | ||
| APlayerController * | GetPlayerControllerFromViewerHandle
(
const FMassViewerHandle& ViewerHandle |
Returns PlayerController pointer from the viewer handle | |
| const TArray< FViewerInfo > & | Synchronize the viewers if not done this frame and returns the updated array | ||
| int32 | GetValidViewerIdx
(
const FMassViewerHandle& ViewerHandle |
Returns the index of the viewer if valid, otherwise INDEX_NONE is return | |
| FMassViewerHandle | GetViewerHandleFromActor
(
const AActor& Actor |
Returns viewer handle from the PlayerController pointer | |
| FMassViewerHandle | GetViewerHandleFromPlayerController
(
const APlayerController* PlayerController |
||
| FMassViewerHandle | GetViewerHandleFromStreamingSource
(
const FName StreamingSourceName |
Returns viewer handle from the streaming source name | |
| const TArray< FViewerInfo > & | GetViewers () |
Returns the array of viewers | |
| bool | |||
| bool | IsValidViewer
(
const FMassViewerHandle& ViewerHandle |
Checks the validity of a viewer handle | |
| void | OnPlayerControllerEndPlay
(
AActor* Actor, |
Player controller EndPlay callback, removing viewers from the list | |
| void | OnPrePhysicsPhaseStarted
(
float DeltaTime |
Called at the start of the PrePhysics mass processing phase and calls SynchronizeViewers | |
| void | RegisterActorViewer
(
AActor& ActorViewer |
||
| void | RemoveViewer
(
const FMassViewerHandle& ViewerHandle |
Removes a viewer to the list and send notification about removal | |
| void | Synchronizes the viewers from the engine PlayerController list | ||
| void | UnregisterActorViewer
(
AActor& ActorViewer |
Overridden from UMassSubsystemBase
| Type | Name | Description | |
|---|---|---|---|
| void | Deinitialize () |
||
| void | Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem BEGIN. |
Typedefs
| Name | Description |
|---|---|
| FOnViewerAdded | |
| FOnViewerRemoved |