Level name

Hello i have a landscape made with different tiles and i want to find the name where an actor whas so i try this :

FString ASave::GetCurrentMap(AActor * currentActor)
{
	FString currentMapName = currentActor->GetWorld()->GetCurrentLevel()->GetOutermost()->GetName();
	
	return currentMapName;
}

But this give me the persistent level, any idea ? Thanks

To get the current level’s name you should use this:

currentActor->GetWorld()->GetMapName();

Thanks you !

If my answer helped to solve your issue please accept it thanks! :slight_smile: