How can I know if one or more instances of a level areloaded?

I use level streaming to load different levels.

I use ULevelStreamingKismet::LoadLevelInstanceBySoftObjectPtr.

Assuming I don’t keep track of the levels I have loaded so far, How can I know if I have already loaded a level?

Thanks!

Grab the list of streaming levels registered with the world.
Then iterate through them and find if they are loaded. Also, use the same streaming level object to find the level it is supposed to load

const TArray<ULevelStreaming*>& StreamingLevels = GetWorld()->GetStreamingLevels();

for (ULevelStreaming* StreamingLevel : StreamingLevels) {
	bool bLoaded = StreamingLevel->HasLoadedLevel();
	ULevel* Level = StreamingLevel->GetLoadedLevel();
	// ...
}

Thanks Ali!