Knowledge base
Knowledge base
Knowledge base
Free, anonymous browsing of Unreal Engine Blueprint examples, node references, and best practices. The same content the WoalzCraft plugin uses to generate Blueprints.
21 results for savegame
Cast ReturnValue to your SaveGame subclass (e.g. UBP_SaveGame) to set variables on it.
CreateSaveGameObjectUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoSAVE pattern: EventBeginPlay or custom → CreateSaveGameObject(SaveGameClass=BP_SaveGame) → CastTo<BP_SaveGame> → Set all variables on cast result → SaveGameToSlot(SaveGameObject=cast result, SlotName='SaveSlot1', UserIndex=0). LOAD pattern: DoesSaveGameExist(SlotName='SaveSlot1', UserIndex=0) → Branch → True → LoadGameFromSlot(SlotName='SaveSlot1', UserIndex=0) → IsValid → Is Valid → CastTo<BP_SaveGame> → read variables. Key pins: SaveGameToSlot inputs 'SaveGameObject' (SaveGame), 'SlotName' (string), 'UserIndex' (int). LoadGameFromSlot inputs 'SlotName' (string), 'UserIndex' (int), output 'ReturnValue' (SaveGame).
Why: Your save logic targets the SaveGame class '{cls}', but that asset is gone. The save call would fail at runtime. Fix: Find your existing SaveGame subclass in Content Browser (search for 'SaveGame'). If still there but renamed: update the Cast To node + Class pin. If gone: create a new SaveGame Blueprint (Right-click → Blueprint Class → SaveGame parent), copy your fields back, and re-point save/load calls at it.
UGameplayStatics::CreateSaveGameObject. Cast result to your SaveGame class.
Create Save Game ObjectUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoSave: CreateSaveGameObject(MySaveGameClass) → Cast → SET variables → SaveGameToSlot(Object, SlotName, 0). Load: DoesSaveGameExist(SlotName, 0) → Branch → True: LoadGameFromSlot(SlotName, 0) → Cast to MySaveGame → GET variables. Put save/load logic in GameInstance for persistence across levels.
SlotName is an arbitrary string key (e.g. 'SaveSlot1'). UserIndex 0 for single-player.
SaveGameToSlotUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoA class for persisting player progress to disk. Subclass USaveGame, add fields, then SaveGameToSlot / LoadGameFromSlot.
Returns null if slot doesn't exist. Always check IsValid before using the result.
LoadGameFromSlotUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoWrites a SaveGame instance to a named slot on disk. LoadGameFromSlot reads it back. Choose unique slot names per save file.
Save Game to SlotUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago