G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UViewportStatsSubsystem Class Reference

The Viewport Stats Subsystem offers the ability to add messages to the current viewport such as "LIGHTING NEEDS TO BE REBUILT" and "BLUEPRINT COMPILE ERROR". More...

Public Member Functions

Viewport Stats Subsystem
void AddTimedDisplay (FText Text, FLinearColor Color=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), float32 Duration=0.000000, FVector2D DisplayOffset=FVector2D())
 Add a message to be displayed on the viewport of this world.
void RemoveDisplayDelegate (int IndexToRemove)
 Remove a callback function from the display subsystem.
int AddDisplayDelegate (FViewportDisplayCallback Delegate=FViewportDisplayCallback())
 Add a dynamic delegate to the display subsystem.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UViewportStatsSubsystem Get ()
static UClass StaticClass ()
Static Public Member Functions inherited from UWorldSubsystem
static UClass StaticClass ()
Static Public Member Functions inherited from USubsystem
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Additional Inherited Members

Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

The Viewport Stats Subsystem offers the ability to add messages to the current viewport such as "LIGHTING NEEDS TO BE REBUILT" and "BLUEPRINT COMPILE ERROR".

Example usage:

 if (UViewportStatsSubsystem* ViewportSubsystem = GetWorld()->GetSubsystem<UViewportStatsSubsystem>())
 {

Bind a member function delegate to the subsystem... FViewportDisplayCallback Callback; Callback.BindDynamic(this, &UCustomClass::DisplayViewportMessage); ViewportSubsystem->AddDisplayDelegate(Callback);

... or use inline lambda functions ViewportSubsystem->AddDisplayDelegate([](FText& OutText, FLinearColor& OutColor) { Some kind of state management OutText = NSLOCTEXT("FooNamespace", "Blarg", "Display message here"); OutColor = FLinearColor::Red; return bShouldDisplay; }); }

Member Function Documentation

◆ AddDisplayDelegate()

int AddDisplayDelegate ( FViewportDisplayCallback Delegate = FViewportDisplayCallback ( ))

Add a dynamic delegate to the display subsystem.

◆ AddTimedDisplay()

void AddTimedDisplay ( FText Text,
FLinearColor Color = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ),
float32 Duration = 0.000000,
FVector2D DisplayOffset = FVector2D ( ) )

Add a message to be displayed on the viewport of this world.

Parameters
TextThe text to be displayed
ColorColor of the text to be displayed
DurationHow long the text will be on screen, if 0 then it will stay indefinitely
DisplayOffsetA position offset that the message should use when displayed.

◆ Get()

UViewportStatsSubsystem Get ( )
static

◆ RemoveDisplayDelegate()

void RemoveDisplayDelegate ( int IndexToRemove)

Remove a callback function from the display subsystem.

Parameters
IndexToRemoveThe index in the DisplayDelegates array to remove. This is the value returned from AddDisplayDelegate.

◆ StaticClass()

UClass StaticClass ( )
static