UAssetManager::GetPrimaryAssetObject

Gets the in-memory [UObject](API\Runtime\CoreUObject\UObject\UObject) for a primary asset id, returning nullptr if it's not in memory.

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/AssetManager.h

Include

#include "Engine/AssetManager.h"

Source

/Engine/Source/Runtime/Engine/Private/AssetManager.cpp

Syntax

virtual UObject * GetPrimaryAssetObject
(
    const FPrimaryAssetId & PrimaryAssetId
) const

Remarks

Gets the in-memory UObject for a primary asset id, returning nullptr if it's not in memory. Will return blueprint class for blueprint assets. This works even if the asset wasn't loaded explicitly