Blueprints or code?
Author: Riley Darling
Posted on 5/17/2024
Adding a save and load system to a game seems relatively easy at first, especially since Unreal has a built in system so you don't have to read or write from any external files at all! The problem comes from one simple function that wasted most of my week, AsyncLoadGameFromSlot, everything else with the saving and loading was working just fine until I tried to implement this function in code. You see it is rather simple to setup in blueprint as you can just drag off the "completed" pin to connect up to what you want to do when the load has been completed, super simple and easy:
The only issue with this is in code, you have to connect that "completed" option to a built in delegate from a different class!
The solution I found to this problem that took a good part of my week was ignoring the async load and just using the normal LoadGameFromSlot function. This may be a problem later down the line if we need to use async when our save files become too large but that is a hurdle we can deal with when we get to it. I still don't know how to set a delegate type that is from a different class, and if I do end up needing to fix this I will simply add the async code into a blueprint, even if that's not the professional way to handle the situation. I've already wasted enough time on this silly little system as it is.
In Plain Sight
Status | In development |
Authors | 6SidedStudio, TrayCoats, Jonathan Kohl, wunt, Kyu, Glitch, DeltaCompany |
Genre | Puzzle |
Tags | Fantasy, First-Person, Horror, Stealth |
More posts
- Death And RebirthJun 01, 2024
- Missing Projectiles - Jonathan KohlMay 31, 2024
- Town AlarmMay 31, 2024
- Opening back up the Opening.May 31, 2024
- Try, Try, AgainMay 30, 2024
- When the hint shop scammed the playerMay 26, 2024
- Town Alarm Collision DetectionMay 25, 2024
- Grappling hook and Shifting prioritiesMay 25, 2024
- Making Cutscene is Time ConsumingMay 24, 2024
- Trouble Returning Ritual Items – Jonathan KohlMay 24, 2024
Leave a comment
Log in with itch.io to leave a comment.