-
Notifications
You must be signed in to change notification settings - Fork 325
Save Game support
Krzysiek Justyński edited this page Aug 15, 2022
·
11 revisions
Flow Graph simply plugs into Unreal's SaveGame system. If you haven't used it yet, read "Saving and Loading Your Game" docs.
You control which properties are included in SaveGame by marking C++ properties with the SaveGame specifier. Or by ticking the SaveGame checkbox in the blueprint editor.
What to look for?
-
FlowSave.h. Active graphs are serialized to theUFlowSaveGameobject which simply extends the engine'sUSaveGame. That allows you to easily integrate Flow Graph into your SaveGame setup. -
UFlowSubsystemkeeps a registry of all active Flow Graphs at the given moment. That's why it also contains methods providing SaveGame support. You need to call methods likeOnGameSaved, andOnGameLoaded. These are accessible from blueprints. -
UFlowNodeclass provides overridable eventsOnSaveandOnLoad, so you can custom SaveGame logic to any node, i.e. restore Timer with "RemainingTime" value read from SaveGame. CheckUFlowNode_Timerclass for reference. -
UFlowAssetandUFlowComponentexposes similarOnSaveandOnLoadevents, so you should be able to customize SaveGame logic in every plugin's class that's involved in SaveGame operations.
You can find a quick example of integrating Flow into your SaveGame setup in the FlowSolo demo project. Here's simple C++ classes related to this.
Got any questions? Discuss things related to the plugin on the dedicated Discord server.