# Open the same level but with different functionalities

**URL:** <https://forums.unrealengine.com/t/open-the-same-level-but-with-different-functionalities/436806>\
**Category:** Blueprint\
**Tags:** open-level, unreal-engine, UE4, Blueprint, question\
**Created:** [November 1, 2018, 5:01am UTC](https://forums.unrealengine.com/t/open-the-same-level-but-with-different-functionalities/436806 "2018-11-01T05:01:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RookieEncoder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RookieEncoder](https://forums.unrealengine.com/u/RookieEncoder)\
**Post date:** [November 1, 2018, 5:01am UTC](https://forums.unrealengine.com/t/open-the-same-level-but-with-different-functionalities/436806/1 "2018-11-01T05:01:42Z")

</div>

By functionality i mean, for example there are 2 buttons, button 1 and button 2. If the player pressed button 1 it will open a new level. Else, if the user pressed button 2 it will open the same level but it will show a widget first.

I dont know how to do this without making a 2 different level. I want it to spawn to the same level because i dont want to make the game size bigger. Is it possible to do this and how ?

---

<div class="post-metadata">

**Author:** ![PixelOmen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PixelOmen](https://forums.unrealengine.com/u/PixelOmen)\
**Post date:** [November 1, 2018, 6:12am UTC](https://forums.unrealengine.com/t/open-the-same-level-but-with-different-functionalities/436806/2 "2018-11-01T06:12:24Z")

</div>

Sure, you definitely don’t need to duplicate an entire level to change a small thing like a widget on a different level. What you want is something called the Game Instance. It is a type of Blueprint similar to GameMode except that it exists across all levels and GameModes. It pretty much exists until the game quits.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

> **[whats the deferent between gamestate and game instance](https://forums.unrealengine.com/questions/189120/whats-the-deferent-between-gamestate-and-game-inst.html)**
>
> whats the deferent between gamestate and gameinstance what we should use for multiplayer UI (UMG) cuz i see some use the gamestate and some use gameinstance

Using this, you can store some kind of information about what button the player pushed, and then call this information from the game instance after the level loads to decide whether or not to show the widget.

---

<div class="post-metadata">

**Author:** ![mightyenigma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mightyenigma](https://forums.unrealengine.com/u/mightyenigma)\
**Post date:** [November 1, 2018, 7:03am UTC](https://forums.unrealengine.com/t/open-the-same-level-but-with-different-functionalities/436806/3 "2018-11-01T07:03:45Z")

</div>

When they click button 2 then set a variable in the game instance first.

When the level begins, have it check the variable you set in the game instance - if it is set to a certain value then show the widget. Game instance variables survive level changes.
