How can I get the current map name?

How can I get the current map (level) name? Blueprint, C++ or even console.

In C++ is

()->GetMapName();
3 Likes

Hi Cristian,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

An addendum: only GetMapName() will add something like UEDPIE prefixed to the level name, if you’re playing in editor. If you want it to always return the “true” level name, regardless of whether it’s PIE or not, use

	FString LevelName = ()->GetMapName();
	LevelName.RemoveFromStart(()->StreamingLevelsPrefix);
14 Likes

Thank you so much. I was frustrated about the same problem.

This is the real answer. Thank you.

1 Like

For blueprints it is
image

5 Likes