UAssetManager::RefreshPrimaryAssetDirectory
#include "Engine/AssetManager.h"
Access: public
Specifiers: virtual
Description
Refreshes the entire set of primary asset data, useful in the editor after assets have changed dramatically.
Caveats & Gotchas
- • Without bForceRefresh=true, it only rescans if the manager detects something changed, so asset edits made outside the normal editor workflow (e.g. via script) may be missed.
- • Effectively redoes primary asset type scanning and can be slow on large projects — avoid calling it every frame or in tight loops.
Signature
virtual void RefreshPrimaryAssetDirectory(bool bForceRefresh = false) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bForceRefresh | bool | If true, always rescan even if the manager doesn't think anything changed. | false |
Return Type
void Example
Force a full rescan after bulk asset changes C++
UAssetManager::Get().RefreshPrimaryAssetDirectory(true); Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?