Unreal Engine 5 · Blueprint → C++
Load Game From Slot in Unreal Engine 5 C++UE Docs
The Load Game From Slot node maps to UGameplayStatics::LoadGameFromSlot(TEXT("Slot1"), 0), which reads the slot from disk and returns a USaveGame* you Cast to your subclass.
Blueprint node & C++ equivalent
UMySaveGame* Save = Cast<UMySaveGame>(
UGameplayStatics::LoadGameFromSlot(TEXT("Slot1"), 0));What does the Load Game From Slot node do?
Load Game From Slot reads the binary file for a given slot name and user index, deserializes it, and returns the reconstructed USaveGame object. Its UPROPERTY fields are restored to the values they had when it was saved.
If the slot does not exist or fails to load, the function returns nullptr.
LoadGameFromSlot C++ example
Call UMySaveGame* Save = Cast<UMySaveGame>(UGameplayStatics::LoadGameFromSlot(TEXT("Slot1"), 0));. The cast converts the returned base USaveGame* into your subclass so you can read your own properties.
Always null-check the result before dereferencing, because a missing or corrupt slot returns nullptr and the cast will too.
When to use it in C++
Use LoadGameFromSlot at startup or when the player picks a save slot. Pair it with UGameplayStatics::DoesSaveGameExist first if you want to branch on whether a slot is present before attempting to load.
Frequently asked questions
What is LoadGameFromSlot in UE5 C++?+
UGameplayStatics::LoadGameFromSlot reads a saved slot from disk and returns a USaveGame* that you cast to your subclass.
What does LoadGameFromSlot return if the save is missing?+
It returns nullptr. Always null-check the result, since the subsequent Cast will also be null.
Do I need CreateSaveGameObject before loading?+
No. LoadGameFromSlot already returns a populated object, so you only create a save object when starting fresh.