![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AssetRegistryTagsContext.h>
Friends | |
| class | UObject |
Interface used by GetAssetRegistryTags to access the calling context data.
API Notes: CookTag functions on this class add CookTags - tags that are added only when cooking and that are added to the development AssetRegistry used for patches patches, DLC, and Incremental cooking, but are removed from the runtime AssetRegistry passed into the game. CookTags can only be added when WantsCookTags() is true, calls in other Context states are ignored. All tags added with the CookTags interface have "Cook_" prepended to their names prior to being saved into the development to the asset registry.
CookType: When GetAssetRegistryTags is called for package saves during cook, the cook type is set depending on the type of cook. Cooks in Unreal can be either CookByTheBook or CookOnTheFly. If GetAssetRegistryTags was called for other reasons, the CookType is reported as unknown. CookByTheBook means that the project's packaging settings are read by the cooker and a list of all referenced packages are found and those packages are saved and packaged. CookOnTheFly means that the game is running without packaged data, and is connecting to the cooker process to request the cooked version of packages that it demands. Only the packages requested by the runtime session are cooked.
| FAssetRegistryTagsContext::FAssetRegistryTagsContext | ( | FAssetRegistryTagsContextData & | InData | ) |
| FAssetRegistryTagsContext::FAssetRegistryTagsContext | ( | const FAssetRegistryTagsContext & | Other | ) |
| void FAssetRegistryTagsContext::AddCookTag | ( | UObject::FAssetRegistryTag | TagResult | ) |
AddTag but for a cooktag.
| void FAssetRegistryTagsContext::AddTag | ( | UObject::FAssetRegistryTag | TagResult | ) |
Output function: move the given tag into the results, overwriting previous result if it exists.
ContainsTag but for a cooktag.
Output function: Report whether a tag is already in the output. Issues an error if TagName is invalid.
| void FAssetRegistryTagsContext::EnumerateTags | ( | TFunctionRef< void(const UObject::FAssetRegistryTag &)> | Visitor | ) | const |
Pass each tag so far reported to the context into the provided Visitor, including CookTags.
| UObject::FAssetRegistryTag * FAssetRegistryTagsContext::FindCookTag | ( | FName | TagName | ) |
FindTag but for a cooktag.
| UObject::FAssetRegistryTag & FAssetRegistryTagsContext::FindOrAddCookTag | ( | FName | TagName, |
| bool * | bOutAlreadyExists | ||
| ) |
FindOrAddCookTag but for a cooktag.
| UObject::FAssetRegistryTag & FAssetRegistryTagsContext::FindOrAddTag | ( | FName | TagName, |
| bool * | bOutAlreadyExists = nullptr |
||
| ) |
Output function: Add a tag if it does not already exist. Return reference to the existing tag and optionally report whether it already existed. Issues an error and returns referenced to unused global if TagName is invalid.
| UObject::FAssetRegistryTag * FAssetRegistryTagsContext::FindTag | ( | FName | TagName | ) |
Output function: Find a tag in the output if it already exists. Issues an error if TagName is invalid.
| const FAssetBundleData * FAssetRegistryTagsContext::GetBundleResult | ( | ) |
| EAssetRegistryTagsCaller FAssetRegistryTagsContext::GetCaller | ( | ) | const |
| UE::Cook::ECookingDLC FAssetRegistryTagsContext::GetCookingDLC | ( | ) | const |
If IsCooking is true, returns whether whether the cook is for a DLC rather than base game. If IsCooking is false, returns ECookingDLC::Unknown.
| UE::Cook::ECookType FAssetRegistryTagsContext::GetCookType | ( | ) | const |
If IsCooking is true, returns the cook type,
| int32 FAssetRegistryTagsContext::GetNumTags | ( | ) | const |
Return the number of tags so far reported to the context, including CookTags.
| const UObject * FAssetRegistryTagsContext::GetObject | ( | ) | const |
| const ITargetPlatform * FAssetRegistryTagsContext::GetTargetPlatform | ( | ) | const |
Return the targetplatform of the save, if cooking. Null if not saving or not cooking.
| bool FAssetRegistryTagsContext::IsCookByTheBook | ( | ) | const |
If IsCooking is true, reports whether the cook is CookByTheBook.
| bool FAssetRegistryTagsContext::IsCooking | ( | ) | const |
Report whether this is a save into a target-specific cooked format. False if not saving.
| bool FAssetRegistryTagsContext::IsCookOnTheFly | ( | ) | const |
If IsCooking is true, reports whether the cook is CookByTheBook.
| bool FAssetRegistryTagsContext::IsCookTypeUnknown | ( | ) | const |
If IsCooking is true, reports whether the cook type is unknown and could be any type of cook. If IsCooking is false, returns true.
| bool FAssetRegistryTagsContext::IsFullUpdate | ( | ) | const |
Whether all tags should be calculated, as set by the creator of the context (e.g. SavePackage).
| bool FAssetRegistryTagsContext::IsProceduralSave | ( | ) | const |
Return whether the package is being saved due to a procedural save. False if not saving. Any save without the possibility of user-generated edits to the package is a procedural save (Cooking, EditorDomain). This allows us to add or update tags that only need to be modified in response to new user data.
| bool FAssetRegistryTagsContext::IsSaving | ( | ) | const |
Whether the call is coming from SavePackage. See functions below for determining what kind of save.
| void FAssetRegistryTagsContext::SetBundleResult | ( | const FAssetBundleData * | InBundleResult | ) |
| bool FAssetRegistryTagsContext::WantsBundleResult | ( | ) | const |
True if the caller wants the FAssetBundleData structure (if present) to be stored as a pointer. If false, the FAssetBundleData structure should instead be converted to text and stored as a tag.
| bool FAssetRegistryTagsContext::WantsCookTags | ( | ) | const |
Return whether the context is collecting cook tags. CookTag functions are noops if this returns false. CookTags are only collected for CookByTheBook.