According to the documentation : The GameInstance exists for the duration of the engine’s session, meaning that it is created when the engine starts up and not destroyed or replaced until the engine shuts down. A separate GameInstance exists on the server and on each client, and these instances do not communicate with each other. Because the GameInstance exists outside of the game session and is the only game structure that exists across level loads, it is a good place to store certain types of persistent data, such as lifetime player statistics (e.g. total number of games won), account information (e.g. locked/unlocked status of special items), or even a list of maps to rotate through in a competitive game like Unreal Tournament.
Step 1: Create a Blueprint GameInstance and BP Interface
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-7.png)
![This image has an empty alt attribute; its file name is image-6.png](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-6.png)
Step 2: Connect Interface to Gameinstance and make Reference
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-8.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-11.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-12.png)
Step 3 : Create Blueprint Widget and add Show MainMenu in Interface
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-13.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-9.png)
Step 4 : Building the Widget
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-14-1024x413.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-15-1024x642.png)
Step 5 : Event Show Main Menu in GameInstance
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-17.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-16-1024x367.png)
Step 6 : Open main menu from level blueprint
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-18-1024x596.png)
Video step 1 to 6
In the following video I forgot to show that in Project Settings, Maps en Modes, the Game Instance class is set to your created Gameinstance!!
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-6.png)
Previous steps are preparation for the real thing 🙂
Step 7 Create PlayerInfo Struct, Add to Interface, Store in GameInstance
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-19.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-10.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-21-1024x448.png)
Step 8 Store to PlayerInfo in Menu. Event M to print PlayerInfo
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-22-1024x536.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-23-1024x410.png)
Video step 7 and 8
Wrap up Part 4
Extra
I have added another part, where on the Gameinstance al list of numbers is stored. This list is filled by the clients. In this case I used the character for getting access to the gameinstance of the server
Keys : G and H
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-29.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-30-1024x451.png)
![](https://unreal.fluiddynamics.eu/wp-content/uploads/2020/12/image-32-1024x576.png)
Result