How to check whether level was loaded?

Hello,
I’m loading levels in my GameMode class via LoadStreamLevel function. It works nice.

But, is there any way to check whether level was loaded?

When I’m using code:

ULevelStreaming* ls = UGameplayStatics::GetStreamingLevel(this, FName(TEXT("LevelOne")));
if(ls != NULL)
{
    if (ls->IsLevelLoaded())
    {
      ...
    }
}

I’m getting linker error 2019:

MyGameMode.cpp.obj : error LNK2019: unresolved external symbol "public: bool __cdecl ULevelStreaming::IsLevelLoaded(void)const " (?IsLevelLoaded@ULevelStreaming@@QEBA_NXZ) referenced in function "public: void __cdecl AMyGameMode::UnloadCurrentLevel(void)" (?UnloadCurrentLevel@AMyGameMode@@QEAAXXZ)

PS: And also, can You tell me in a nutshell about FLatentActionInfo in LoadStreamLevel and UnloadStreamLevel functions?

Paste the error

That function isn’t exposed outside the module because it’s just a trivial wrapper, but you should be able to call GetLoadedLevel() or just access LoadedLevel directly, it does the same thing. If it’s not NULL, the level is loaded.

I unfortunately don’t know anything about FLatentActionInfo, you probably want to ask a separate question for that.

It works. Thanks, Ben.