USignificanceManager

The significance manager provides a framework for registering objects by tag to each have a significance value calculated from which a game specific subclass and game logic can make decisions about what level of detail objects should be at, tick frequency, whether to spawn effects, and other such functionality

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

USignificanceManager

References

Module

SignificanceManager

Header

/Engine/Plugins/Runtime/SignificanceManager/Source/SignificanceManager/Public/SignificanceManager.h

Include

#include "SignificanceManager.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(Config=Engine, defaultconfig)
class USignificanceManager : public UObject

Remarks

The significance manager provides a framework for registering objects by tag to each have a significance value calculated from which a game specific subclass and game logic can make decisions about what level of detail objects should be at, tick frequency, whether to spawn effects, and other such functionality

Each object that is registered must have a corresponding unregister event or else a dangling Object reference will be left resulting in an eventual crash once the Object has been garbage collected.

Each user of the significance manager is expected to call the Update function from the appropriate location in the game code. GameViewportClient::Tick may often serve as a good place to do this.

Variables

Name Description

Protected variable

uint32: 1

 

bCreateOnClient

Whether the significance manager should be created on a client. Only used from CDO and.

Protected variable

uint32: 1

 

bCreateOnServer

Whether the significance manager should be created on the server.

Protected variable

uint32: 1

 

bSortSignificanceAscending

Whether the significance sort should sort high values to the end of the list.

Protected variable

TArray< FTransf...

 

Viewpoints

The cached viewpoints for significance for calculating when a new object is registered.

Constructors

Name Description

Public function

USignificanceManager()

Functions

Name Description

Public function Static

T *

 

Get

(
    const UWorld* World
)

Templated convenience function to return a significance manager cast to a known type.

Public function Static

USignificanc...

 

Get

(
    const UWorld* World
)

Returns the significance manager for the specified World.

Public function Const

const USigni...

 

GetManagedObject

(
    const UObject* Object
)

Returns the managed object for the passed-in object, if any. Otherwise returns nullptr.

Public function Const

USignificanc...

 

GetManagedObject

(
    UObject* Object
)

Returns the managed object for the passed-in object, if any. Otherwise returns nullptr.

Public function Const

const TArray...

 

GetManagedObjects

(
    FName Tag
)

Returns objects of specified tag, Tag must be specified or else an empty array will be returned.

Public function Const

void

 

GetManagedObjects

(
    TArray< FManagedObjectInfo* > ...,
    bool bInSignificanceOrder
)

Returns all managed objects regardless of tag.

Public function Const

float

 

GetSignificance

(
    const UObject* Object
)

Returns the significance value for a given object, returns 0 if object is not managed.

Public function Const

const TArray...

 

GetViewpoints()

Returns the list of viewpoints currently being represented by the significance manager.

Public function Virtual Const

UWorld *

 

GetWorld()

Public function Const

bool

 

QuerySignificance

(
    const UObject* Object,
    float& OutSignificance
)

Returns true if the object is being tracked, placing the significance value in OutSignificance (or 0 if object is not managed)

Protected function

void

 

RegisterManagedObject

(
    FManagedObjectInfo* ObjectInfo
)

Internal function that takes the managed object info and registers it with the significance manager.

Public function Virtual

void

 

RegisterObject

(
    UObject* Object,
    FName Tag,
    FManagedObjectSignificanceFunction ...,
    EPostSignificanceType InPostSignifi...,
    FManagedObjectPostSignificanceFunct...
)

Overridable function used to register an object as managed by the significance manager.

Public function

void

 

UnregisterAll

(
    FName Tag
)

Unregisters all objects with the specified tag.

Public function Virtual

void

 

UnregisterObject

(
    UObject* Object
)

Overridable function used to unregister an object as managed by the significance manager.

Public function Virtual

void

 

Update

(
    TArrayView< const FTransform > View...
)

Overridable function to update the managed objects' significance.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Classes

Name

Description

Public struct

FManagedObjectInfo

Enums

Name

Description

Public enum

EPostSignificanceType

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss