UntrackRenderAsset
UntrackRenderAsset
#Overview
name: UntrackRenderAsset
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 UntrackRenderAsset is to remove a specific render asset (such as a texture or mesh) from the list of tracked assets in Unreal Engine’s content streaming system.
This setting variable is primarily used in the content streaming subsystem of Unreal Engine, specifically within the rendering and asset management modules. Based on the callsites, it’s mainly referenced in the ContentStreaming.cpp and StreamingManagerTexture.cpp files, which are part of the Engine’s runtime.
The value of this variable is not set directly, as it’s a function rather than a variable. Instead, it’s a boolean function that takes an asset name as a parameter and returns true if the asset was successfully removed from tracking.
UntrackRenderAsset interacts with other functions and variables in the content streaming system, such as:
- GTrackedRenderAssetNames: A global array that stores the names of tracked render assets.
- TrackRenderAsset: A complementary function that adds assets to the tracking list.
- ListTrackedRenderAssets: A function that lists all currently tracked assets.
Developers should be aware of the following when using UntrackRenderAsset:
- It’s part of the content streaming system, which affects performance and memory usage.
- The function works with asset names, so ensure the correct and full asset name is provided.
- Untracking an asset may affect how it’s loaded and managed in memory.
Best practices when using UntrackRenderAsset include:
- Use it judiciously, as tracking assets is generally beneficial for performance.
- Ensure you have a good reason to untrack an asset, such as manual management or debugging.
- Keep track of which assets you’ve untracked to avoid confusion in asset management.
- Use in conjunction with other streaming management tools and functions for a comprehensive approach to asset streaming.
- Be aware of the performance implications of frequently tracking and untracking assets.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:182
Scope (from outer to inner):
file
function bool UntrackRenderAsset
Source code excerpt:
* @return true if the name was removed
*/
bool UntrackRenderAsset( const FString& AssetName )
{
if ( GConfig && AssetName.Len() > 0 )
{
int32 TrackedAssetIndex = 0;
for ( ; TrackedAssetIndex < GTrackedRenderAssetNames.Num(); ++TrackedAssetIndex)
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:208
Scope (from outer to inner):
file
function bool UntrackTexture
Source code excerpt:
bool UntrackTexture(const FString& TextureName)
{
return UntrackRenderAsset(TextureName);
}
/**
* Lists all currently tracked texture/mesh names in the specified log.
*
* @param Ar Desired output log
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/ContentStreaming.cpp:335
Scope (from outer to inner):
file
function bool UntrackRenderAsset
Source code excerpt:
return TrackRenderAsset(TextureName);
}
bool UntrackRenderAsset(const FString& AssetName)
{
return false;
}
bool UntrackTexture( const FString& TextureName )
{
return UntrackRenderAsset(TextureName);
}
void ListTrackedRenderAssets(FOutputDevice& Ar, int32 NumAssets)
{
}
void ListTrackedTextures( FOutputDevice& Ar, int32 NumTextures )
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:91
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:2498
Scope (from outer to inner):
file
function bool FRenderAssetStreamingManager::HandleUntrackRenderAssetCommand
Source code excerpt:
FString AssetName(FParse::Token(Cmd, 0));
if (UntrackRenderAsset(AssetName))
{
Ar.Logf(TEXT("Textures or meshes containing \"%s\" are no longer tracked."), *AssetName);
}
return true;
}
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/StreamingManagerTexture.cpp:2949
Scope (from outer to inner):
file
function bool FRenderAssetStreamingManager::Exec
Source code excerpt:
}
else if (FParse::Command(&Cmd,TEXT("UntrackTexture"))
|| FParse::Command(&Cmd, TEXT("UntrackRenderAsset")))
{
return HandleUntrackRenderAssetCommand( Cmd, Ar );
}
else if (FParse::Command(&Cmd,TEXT("StreamOut")))
{
return HandleStreamOutCommand( Cmd, Ar );