# What variable to use with Map Name/ Level name?

**URL:** <https://forums.unrealengine.com/t/what-variable-to-use-with-map-name-level-name/411940>\
**Category:** Editor Scripting\
**Tags:** Variable, save-level, map-load, unreal-engine, question\
**Created:** [December 11, 2017, 6:58am UTC](https://forums.unrealengine.com/t/what-variable-to-use-with-map-name-level-name/411940 "2017-12-11T06:58:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_451ef1c5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_451ef1c5](https://forums.unrealengine.com/u/anonymous_user_451ef1c5)\
**Post date:** [December 11, 2017, 6:58am UTC](https://forums.unrealengine.com/t/what-variable-to-use-with-map-name-level-name/411940/1 "2017-12-11T06:58:48Z")

</div>

Does any one know what variable these noob should use to save Map Name( Level Name (LV1, LV2, LV3 ETC…) For instance for Player location I would obiviously use Player Location node for Velocity I would Player Velocity node but What do you use for Map Name. Would it be Get current level and if so what type of variable goes with MapName. I gues Name variable but I thought I seen some one use Integer. I could be wrong. Super thanks to anyone who can dismental these problem for me!!!

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [December 11, 2017, 8:32am UTC](https://forums.unrealengine.com/t/what-variable-to-use-with-map-name-level-name/411940/2 "2017-12-11T08:32:11Z")

</div>

They take _Name_ variable. How you store and fetch the value depends on your game. There’s most likely as many ways of doing this as there are people:

 ![223367-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/6/d/06dde05f53a22f0a08731eec083ca197c2f39978.png)

Or like this, storing just 2 ints (which can be in a 2d vector):

 ![223368-cap2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/9/8f9d187d5b97c5d7935e97a7217ecb14f3b8393b.png)

Again, it all depends on how complex your game is. You can just get an array of names and Get 0,1,2 and so on…  
This question has too many answers. A predefined array is most likely the most logical in most situations unless you’re dealing with procedurally generated content.

---

<div class="post-metadata">

**Author:** ![Emidee](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Emidee](https://forums.unrealengine.com/u/Emidee)\
**Post date:** [December 11, 2017, 11:03am UTC](https://forums.unrealengine.com/t/what-variable-to-use-with-map-name-level-name/411940/3 "2017-12-11T11:03:29Z")

</div>

Another way is to set up a UWorld property in your blueprint of type SoftObjectPath. This allows you to select directly a level from the content browser without relying on strings, which are error-prone.

The additional benefits are that if you change your level name, it will be propagated to your property, you won’t have to go in your blueprints to manually update the names.

And since it’s a soft object path, the level won’t be loaded so you don’t have to worry about memory.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_451ef1c5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_451ef1c5](https://forums.unrealengine.com/u/anonymous_user_451ef1c5)\
**Post date:** [December 12, 2017, 10:46am UTC](https://forums.unrealengine.com/t/what-variable-to-use-with-map-name-level-name/411940/4 "2017-12-12T10:46:30Z")

</div>

Ok thank you. What I really needed was the \<\<\< GET CURRENT LEVEL NAME \>\> \> node. So I can save it to Game Instance and then get info out from it with UMG on button pressed. That’s the best way to get MAP NAME!!

 ![223512-get-current-level-name.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/1/141ab06d0b97f245352f73d2cfc62b88790cc691.jpeg)

 ![223513-get-current-level-name-umg-widget.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/8/2/d8290668d7e0c335caa5af211262962b308c62ec.jpeg)
