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.
23 results for gameinstance
Pure node. Ideal for storing data that persists across level loads.
GetGameInstanceUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoPure node. For GameInstance subsystems: GetGameInstance → GetSubsystem. For World subsystems: GetWorld → GetSubsystem. Subsystems are auto-instanced singletons — great for organizing game systems.
GetSubsystemUE 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoSETUP: Create Blueprint inheriting UGameInstanceSubsystem (or UWorldSubsystem for level-scoped). Override Initialize(Collection) to set up. Override Deinitialize to clean up. Add game variables here (Score, PlayTime, Settings). ACCESS FROM ANYWHERE: GetGameInstance → GetSubsystem(BP_GameSubsystem) → CastTo<BP_GameSubsystem> → access variables. WHY: Subsystems auto-create, auto-destroy, and don't need FindActor. Better than GameInstance for well-organized systems. UGameInstanceSubsystem persists across levels. UWorldSubsystem is recreated each level.
Save: 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.
UGameplayStatics::GetGameInstance. Persists across level loads.
Get Game InstanceUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoUGameplayStatics::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 agoCast 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 agoGet Game StateUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoReturns nullptr if slot doesn't exist. Always check DoesSaveGameExist first.
Load Game from SlotUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo agoSave Game to SlotUE 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7updated 2mo ago