RealDocs

UAssetManager::Get

function Engine Since unknown
#include "Engine/AssetManager.h"
Access: public Specifiers: static

Description

Returns the current global AssetManager singleton. This is the standard entry point for calling any AssetManager functionality from gameplay code.

Caveats & Gotchas

  • Will fatal-assert (crash) if called before the AssetManager singleton has been constructed — check IsInitialized() first if there's any chance you're running before UEngine::InitializeObjectReferences.
  • Returns a reference to the base UAssetManager class unless the project overrides AssetManagerClassName in its settings; cast to your game-specific subclass to access custom functionality.
  • Replaces the deprecated static GetIfValid(); use GetIfInitialized() instead if you need a null-safe accessor.

Signature

static UAssetManager& Get();

Return Type

UAssetManager&

Example

Accessing the singleton C++
UAssetManager& AssetManager = UAssetManager::Get();
AssetManager.LoadPrimaryAsset(FPrimaryAssetId("Weapon", "Rifle"));

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.