UAssetManager::SetPrimaryAssetRules
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtual
Description
Overrides the management (cook/chunk/priority) rules for one specific primary asset, taking precedence over its type's default rules.
Caveats & Gotchas
- • Passing a default-constructed FPrimaryAssetRules doesn't set an empty override — the header notes it deletes any existing per-asset override and falls back to the type rules instead.
- • For merging in only some fields rather than replacing the whole rules struct, use SetPrimaryAssetRulesExplicitly with an explicit override mask instead.
Signature
virtual void SetPrimaryAssetRules(FPrimaryAssetId PrimaryAssetId, const FPrimaryAssetRules& Rules); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| PrimaryAssetId | FPrimaryAssetId | Specific primary asset to override management rules for. | — |
| Rules | const FPrimaryAssetRules& | Override rules for this asset. If this equals the default-constructed rules, any existing override is deleted. | — |
Return Type
void Example
Give one asset a higher chunk priority C++
UAssetManager& Manager = UAssetManager::Get();
FPrimaryAssetRules Rules;
Rules.Priority = 100;
Manager.SetPrimaryAssetRules(FPrimaryAssetId(TEXT("Item"), TEXT("Sword")), Rules); See Also
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?