Hello,
I’m trying to access AssetRegistry from C++ :
#include "UStanceManager.h"
#include "Engine/AssetManager.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "AssetRegistry/IAssetRegistry.h"
#include "../Utils/ULogger.h"
void UStanceManager::PlayExAnim()
{
FAssetRegistryModule registryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>(FName("AssetRegistry"));
IAssetRegistry& registry = registryModule.Get();
}
The compilation works on “Win64 Development Build”, but fails on “Editor Win64 Development Build” or if I run compilation in the Editor, with the error :
Creating library C:[...]\UnrealEditor-MyProject.sup.exp
UStanceManager.cpp.obj : error LNK2001: Unresolved external symbol "public: virtual void __cdecl FAssetRegistryModule::StartupModule(void)" (?StartupModule@FAssetRegistryModule@@UEAAXXZ)
C:[...]\UnrealEditor-MyProject.dll : fatal error LNK1120: 1 unresolved external symbol
(I’m on unreal 5.3)
Why there is a difference here ?
How I make this work on Editor build ?
Thank you for your help !