ULimenSaveSubsystem
Overview
ULimenSaveSubsystem is a subsystem within the LimenCore plugin that handles saving and loading of game data. It provides both synchronous and asynchronous methods to interact with save games, and it manages an optional save widget for user interaction during these operations.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| OnSaveStateChanged | BlueprintAssignable | Event triggered when the save state changes. |
Functions
Return Type | Signature | Description |
|---|---|---|
| SaveData(ULimenSaveData* SaveData, const FString& DataName) | Saves a game data object synchronously. |
| SaveData(const FString& DataName) | Template function to save a game data object of type |
| SaveDataAsync(ULimenSaveData* SaveData, const FString& DataName, const TFunction<void(const FString&, const int32, const bool)>& SaveFinishCallback) | Saves a game data object asynchronously and calls the provided callback upon completion. |
| SaveDataAsync(const FString& DataName, const TFunction<void(const FString&, const int32, const bool)>& SaveFinishCallback) | Template function to save a game data object of type |
| LoadData(const FString& DataName) | Loads a game data object synchronously. |
| LoadData(const FString& DataName) | Template function to load a game data object of type |
| LoadDataAsync(const FName& DataName, const TFunction<void(const FString&, const int32, ULimenSaveData *)>& LoadFinishCallback) | Loads a game data object asynchronously and calls the provided callback upon completion. |
| IsAsyncOperationInProgress() const | Checks if an asynchronous operation is currently in progress. |
Usage & Implementation Notes
The subsystem manages an optional save widget that can be shown during save or load operations.
Asynchronous operations ensure that the game remains responsive by not blocking the main thread.
Callbacks are used to notify when asynchronous operations complete, allowing for further actions based on the success of the operation.