I saved the save data in my game instance BP, in editor everything tested fine, the game successfully save and load everything, but when I quit and reopen the game, when I try load game, nothing is loaded.
The save data file is already created in the save folder, so I assume the data is still there, but why it doesn’t get loaded got me confused.
Is there any places that I should be looking into?
Many thanks!!!
Hey @Guesscui2018
please show screenshots of your blueprints. Could be possible that you overwrite your save data somewhere or have a mismatch in the slot name, etc…
Ok, so the first 3 was how I created the savegame within the game instance BP, the last one is the loading is triggered in my first person character controller.
I wonder if it’s needed to cast to the game instance BP everytime a map change or re-launch of the game?
Hey @Guesscui2018
Do you change your SlotName while in game? Did you check if it is the correct name?
Where is the SaveGameToSlot node?
The save game to slot node is at the bottom with a print string node.
No I actually kept the same name consistantly and didn’t change anything.
All my game is saving to the same slot.
Is there anything has possiblity to cause the saved data to refresh?
It’s really strange, the save file sits right in the folder with exact same name as I saved it, really have no idea why it won’t load.
I see that you create a reference to your SaveGame on EventInit. Did you check what happens here with a PrintString?
Here is an example for Save/Load
UE52_SaveGame.zip (78.4 KB)
Thanks a lot for the file, I’ll check it out. What version of the engine should I use to open it? I’m currently use 5.1.
So I put a print string node in the end of the EventInit,
Screenshot shows every time I launch the game or map the data will get loaded instantly.
But when I press load, no loading is happened and I get bunch of errors.
But once I’m in game, if I press save first then load, everything works fine.
If I quit game and reopen, no data can be loaded.
Also If I load a level after a save, and then I press load, the loading also won’t work.
I was thinking, maybe it’s because that during level switching or re-entering, the character reference got lost so the data doesn’t know how to communicate with the player controller? But how to make it persistant then?
Have a look at this. With this method you can trigger Save/ Load in every blueprint and do not need a reference.
Extract the zip, open the *.uproject file with editor or notepad and change
"EngineAssociation": "4.27",
to
"EngineAssociation": "5.2",
UE427_SaveGame.zip (68.1 KB)
Thanks, will check out.
BTW, I wanted to ask, if I want to know deeper knowledge about save/load/game structure stuff, is there lectures/tutorials to follow? what’s the best ones out there? It seems that tutorials related to this topic are mostly very basic, a real project is far more complex than what the available tutorials can cover it seems.
Ok, great news, I finally got it working - Everything working great except Player’s rotation - it seems no matter what, I couldn’t get player’s rotation data transformed from the save file to after the loading. I’ve tried using a transform, rotator, vector, none of them works.
When using transform, the location data is loaded as intended except the rotation.
This is not normal right? there has to be some ways to get the rotation data loaded?
Nevermind, I realized that I have to set rotation to the controler, instead of the player actor, since the actor is tied to the controller.
Hey @Guesscui2018
so does it work now?
Yes it’s working fine now.
Another Question, just a bit further from last time, how do I know how long each load really takes?
Since I have multiple tasks related to saving and loading happening in the beginning of a level, I need to make sure everything is loaded before it starts the next one.
I heard using Async can help, but that node looks missing in UE5.1 - I couldn’t find it.
How to really properly finish a saving/loading fully?
So far my game’s saving system is working, but I rely on making some delays which I don’t think is all that reliable - I don’t have too much data for my game to load, but just to make sure nothing can go wrong. I’d like to seek out some certain answers.