UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FCookTagList Struct Reference

#include <CookTagList.h>

Public Types

using FTagNameValuePair = TPair< FName, FString >
 

Public Member Functions

 FCookTagList (UPackage *InPackage)
 
void Add (UObject *InObject, FName InTagName, FString &&InTagValue)
 
void Reset ()
 

Public Attributes

UPackagePackage
 
TMap< UObject *, TArray< FTagNameValuePair > > ObjectToTags
 

Detailed Description

Used for passing key-value pairs to the asset registry during serialization during cook, and is accessed off of FArchive::CookContext()

This duplicates functionality in GetAssetRegistryTags, but it exists because some tags are expensive to calculate and the calculation overlaps with other calculations done during serialize.

All tags added to this list have "Cook_" prepended to their names prior to being added to the asset registry.

Cook tags are only added to the development asset registry, and will not show up in the shipped runtime registry.

Cook tags are only generated during Cook By The Book.

Example:

// Cook context is present for all cooks, but the tag list is only for CBTB. if (Ar.CookContext() && Ar.CookContext()->CookTagList()) { FCookTagList* CookTags = Ar.CookContext()->CookTagList(); CookTags->Add(Object, "TagName", FString(TEXT("TagValue"))); }

Member Typedef Documentation

◆ FTagNameValuePair

Constructor & Destructor Documentation

◆ FCookTagList()

FCookTagList::FCookTagList ( UPackage InPackage)
inline

Member Function Documentation

◆ Add()

void FCookTagList::Add ( UObject InObject,
FName  InTagName,
FString &&  InTagValue 
)
inline

Adds a tag to the list to be added to the development asset registry for this object. Note that we only carry over the name/value, not any of the other metadata available when adding tags via GetAssetRegistryTags.

Tags that start with "Diff_" are used for bulk data diff blaming - see DiffAssetBulkDataCommandlet.cpp. When adding diff tags, be sure to add explanatory prose in that commandlet to GBuiltinDiffTagHelp.

◆ Reset()

void FCookTagList::Reset ( )
inline

Member Data Documentation

◆ ObjectToTags

TMap<UObject*, TArray<FTagNameValuePair> > FCookTagList::ObjectToTags

◆ Package

UPackage* FCookTagList::Package

The documentation for this struct was generated from the following file: