ListTrackedRenderAssets
ListTrackedRenderAssets
#Overview
name: ListTrackedRenderAssets
This variable is created as a Console Variable (cvar).
- type:
Exec
- help:
Sorry: Exec commands have no help
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ListTrackedRenderAssets is to provide a way to list and output tracked render assets, which include textures and meshes, in the Unreal Engine 5 content streaming system.
This function is primarily used in the content streaming subsystem of Unreal Engine 5, specifically within the rendering and asset management modules. It’s part of the engine’s core functionality for managing and monitoring streamed assets.
The value of this function is not set as a variable, but rather it’s a function that is called to perform a specific task. It takes two parameters: an output device (FOutputDevice& Ar) and the number of assets to list (int32 NumAssets).
ListTrackedRenderAssets interacts with the GTrackedRenderAssetNames global variable, which is an array that stores the names of tracked render assets.
Developers should be aware that this function is used for debugging and monitoring purposes. It’s not meant for regular gameplay but rather for development and optimization tasks.
Best practices when using this function include:
- Use it sparingly, as it may impact performance if called frequently.
- Utilize it during development and testing phases to monitor asset streaming behavior.
- Consider using it in conjunction with other streaming-related commands for a comprehensive view of the streaming system’s state.
- Be mindful of the NumAssets parameter to control the output volume, especially when dealing with large numbers of assets.
This function is part of a larger set of tools for managing render asset streaming in Unreal Engine 5, and developers should familiarize themselves with related functions and variables for effective use of the streaming system.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:217
Scope (from outer to inner):
file
function void ListTrackedRenderAssets
Source code excerpt:
* @param NumAssets Maximum number of tracked texture/mesh names to output. Outputs all if NumAssets <= 0.
*/
void ListTrackedRenderAssets( FOutputDevice& Ar, int32 NumAssets )
{
NumAssets = (NumAssets > 0) ? FMath::Min(NumAssets, GTrackedRenderAssetNames.Num()) : GTrackedRenderAssetNames.Num();
for ( int32 TrackedAssetIndex=0; TrackedAssetIndex < NumAssets; ++TrackedAssetIndex )
{
const FString& TrackedAssetName = GTrackedRenderAssetNames[TrackedAssetIndex];
Ar.Log( TrackedAssetName );
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:230
Scope (from outer to inner):
file
function void ListTrackedTextures
Source code excerpt:
void ListTrackedTextures(FOutputDevice& Ar, int32 NumTextures)
{
ListTrackedRenderAssets(Ar, NumTextures);
}
/**
* Checks a texture/mesh and tracks it if its name contains any of the tracked render asset names (GTrackedRenderAssetNames).
*
* @param RenderAsset Texture/mesh to check
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:343
Scope (from outer to inner):
file
function void ListTrackedRenderAssets
Source code excerpt:
return UntrackRenderAsset(TextureName);
}
void ListTrackedRenderAssets(FOutputDevice& Ar, int32 NumAssets)
{
}
void ListTrackedTextures( FOutputDevice& Ar, int32 NumTextures )
{
ListTrackedRenderAssets(Ar, NumTextures);
}
bool TrackRenderAssetEvent(FStreamingRenderAsset* StreamingRenderAsset, UStreamableRenderAsset* RenderAsset, bool bForceMipLevelsToBeResident, const FRenderAssetStreamingManager* Manager)
{
return false;
}
bool TrackTextureEvent( FStreamingRenderAsset* StreamingTexture, UStreamableRenderAsset* Texture, bool bForceMipLevelsToBeResident, const FRenderAssetStreamingManager* Manager )
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:92
Scope: file
Source code excerpt:
bool TrackRenderAsset( const FString& AssetName );
bool UntrackRenderAsset( const FString& AssetName );
void ListTrackedRenderAssets( FOutputDevice& Ar, int32 NumTextures );
/**
* Helper function to clamp the mesh to camera distance
*/
FORCEINLINE float ClampMeshToCameraDistanceSquared(float MeshToCameraDistanceSquared)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:2378
Scope (from outer to inner):
file
function bool FRenderAssetStreamingManager::HandleListTrackedRenderAssetsCommand
Source code excerpt:
FString NumAssetString(FParse::Token(Cmd, 0));
int32 NumAssets = (NumAssetString.Len() > 0) ? FCString::Atoi(*NumAssetString) : -1;
ListTrackedRenderAssets(Ar, NumAssets);
return true;
}
FORCEINLINE float SqrtKeepMax(float V)
{
return V == FLT_MAX ? FLT_MAX : FMath::Sqrt(V);
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:2939
Scope (from outer to inner):
file
function bool FRenderAssetStreamingManager::Exec
Source code excerpt:
}
else if (FParse::Command(&Cmd,TEXT("ListTrackedTextures"))
|| FParse::Command(&Cmd, TEXT("ListTrackedRenderAssets")))
{
return HandleListTrackedRenderAssetsCommand( Cmd, Ar );
}
else if (FParse::Command(&Cmd,TEXT("DebugTrackedTextures"))
|| FParse::Command(&Cmd, TEXT("DebugTrackedRenderAssets")))
{