I am working on a game where the player goes through various levels and quests to increase stats, but I can’t figure out the best way to keep the data between the levels. It seems strange to me that there isn’t some class that is persistent between levels that I can subclass to store data in. Currently I change levels using:
GetWorld()->ServerTravel(MapToPlay, false, false);
 
From what I have read so far, the two main options are:
Save the entire state of the game between each level, then reload it. This is guaranteed to work but isn’t trivial.
 
Someone suggested I put data in the LocalPlayer PlayerController. This seems a bit messy to me, and is it guaranteed to work in all circumstances?
 
 
Is there a better way?
             
            
               
               
               
            
            
           
          
            
              
                Rama  
                (Rama)
               
                 
              
                  
                    July 7, 2014,  3:25am
                   
                   
              2 
               
             
            
              #Config  Files
For very small amount of data you can simply save it out to config file and then load it back
  
  
    
  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 — https://unrealcommunity.wiki/! You will be able to find content from...
  
    Reading time: 1 mins 🕑 
      Likes: 19 ❤ 
  
   
  
    
    
  
  
 
#Binary  Save and Load
I have tutorial on how to save any data you want to compressed binary file and then load it back into the game!
  
  
    
  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 — https://unrealcommunity.wiki/! You will be able to find content from...
  
    Reading time: 1 mins 🕑 
      Likes: 19 ❤ 
  
   
  
    
    
  
  
 
             
            
               
               
               
            
            
           
          
            
            
              Thanks , your tutorial is exactly what I’m using for loading/saving 
             
            
               
               
               
            
            
           
          
            
            
              Just want to say here the ways:
Use level streaming and the game/state mode will not change. 
Use the Game Instance, it don’t change between levels. You need to reset it if you leave to the main menu. 
Use Save Game