![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#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 | |
| UPackage * | Package |
| TMap< UObject *, TArray< FTagNameValuePair > > | ObjectToTags |
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"))); }
| using FCookTagList::FTagNameValuePair = TPair<FName, FString> |
|
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.
|
inline |
| TMap<UObject*, TArray<FTagNameValuePair> > FCookTagList::ObjectToTags |
| UPackage* FCookTagList::Package |