How to get path to the current level / just the level name?

Hello,

The AzToolsFramework::AssetSystemRequestBus::Handler has a very useful method const char* GetAbsoluteDevGameFolderPath().

I need to also be able to obtain the path to the level folder in my code. Or, equivalently just the level name will suffice, cause then I can glue that to the result of the aforementioned function.

Is there a supported way of doing that?

Thank you!

Hi @JakubPerlin,

Apologies for the delay. To get the name of the current level you can try GetIEditor()->GetLevelName(). Hopefully that helps!

Are there negative effects of using this on a profile or release? Also, how would you go about including IEditor.h into your gem waf correctly?