GetSubLevelsStatus bug?

Hi, when I use this: TArray FSubLevelStatus SubLevelState = GetSubLevelsStatus(GetWorld());
it fails to compile and gives me this: TWLGameInstance.cpp.obj : error LNK2019: unresolved external symbol “class TArray struct FSubLevelStatus,class FDefaultAllocator __cdecl GetSubLevelsStatus(class UWorld *)” (?GetSubLevelsStatus@@YA?AV?$TArray@UFSubLevelStatus@@VFDefaultAllocator@@@@PEAVUWorld@@@Z) referenced in function “public: void __cdecl UTWLGameInstance::Loading(void)” (?Loading@UTWLGameInstance@@QEAAXXZ)

Is that a bug or am I just stupid?

PS. Had to remove “<” and “>” because code in them went missing in here.

In EngineUtils.h you need to change the declaration to be

ENGINE_API TArray<FSubLevelStatus> GetSubLevelsStatus( UWorld* InWorld );

The “ENGINE_API” bit declares to the compiler that the function should be available to outside modules (like game code).