UE saves and loads games, automatically saves and loads sub-levels, controls flow, switches scenes, and serializes structures. This project helps users become familiar with using these features, and the structure serialization blueprint will be provided in the next version.
- Add 'LQuickFrame' to the project plugin folder and enable the plugin.
- Right-click in the 'Content' folder, select 'QuickFrame/LSavePreset' to create a save preset.
- Configure 'LSavePreset' and add it to 'ProjectSettings/Game/LQuickFrameSettings'.
- Set 'Game Instance Class' to LGameInst in 'ProjectSettings/Maps & Modes'.
// Automatically called when loading is completevoid
OnInit(bool bLoaded)
// Objects that do not need to be saved during special periods use this
bool IsNowCanSave()
// Custom serialization for saving and loading
void OnSerialize(FArchive& Ar)
// Save World
LSaveSystem->SaveWorld
// Save Object
LSaveSystem->SaveObject
// Load Object
LSaveSystem->LoadObject
/*
* New World(scene switching),Process Description
* 1. Asynchronously load the scene and switch, then load sublevels.
* 2. After the scene is loaded, wait for navigation data to load.
* 3. Call LBaseInterface->OnInit(false) on all objects.
* 4. Call LGameInst::OnGameStart
*/
LGameInst->NewWorld
/*
* Load World,Process Description
* 1. read slot info,Switch scenes and automatically load sub-levels.
* 2. After the scene is loaded, wait for navigation data to load.
* 3. Call LBaseInterface->OnInit(true) on all objects.
* 4. Call LGameInst::OnGameStart
*/
LGameInst->LoadWorld
// Open and Close Levels
LGameInst->OpenCloseLevels