C++ API
Review draft. This source page has not completed website editorial and release-specific verification.
All APIs below are in module SaveGameDirectorRuntime. Add it to the consuming module dependencies. UObject/Actor capture, contributor callbacks, and restore run on the game thread. Async storage work completes through the coordinator; callbacks return to the game thread.
USaveGameDirectorSubsystem
Section titled “USaveGameDirectorSubsystem”Header: Subsystems/SaveGameDirectorSubsystem.h; derives from UGameInstanceSubsystem. Obtain through UGameInstance::GetSubsystem<USaveGameDirectorSubsystem>(). Engine owns one subsystem/coordinator per Game Instance; do not delete it or retain ownership.
IsReady,GetLifecycleState,HasActiveOperation,GetActiveOperationHandle,GetCurrentOperationPhase,GetQueuedOperationCount,GetLastCompletedResult: lifecycle and coordinator state.SaveToSlot(Request, Result),LoadFromSlot(Request, Result): synchronous slot operations; bool reports success, result gives status/severity/messages/warnings.SaveToMemory(Request, OutContainer, Result),LoadFromMemory(Request, Container, Result): synchronous canonical memory flow.SaveToSlotAsync(Request, Completion),LoadFromSlotAsync(Request, Completion): asynchronous storage flow; return an operation handle; completion receives result on game thread.SaveToMemoryAsync(Request, Completion),LoadFromMemoryAsync(Request, Container, Completion): asynchronous memory pipeline.DoesSlotExist(Slot),DeleteSlot(Slot): C++ slot query/deletion.StartAutosave,StopAutosave,TriggerAutosaveNow, interval/blocker methods: this Game Instance’s scheduler.- Registration, diagnostics accessors, and native delegates expose registered components, warnings, operation lifecycle, and queued work.
Operations are coordinated per Game Instance. Requests can be rejected before acceptance; an async handle is an identifier, not an owning task.
Requests and results
Section titled “Requests and results”Header: Types/SaveGameDirectorRequests.h. FSaveGameDirectorSaveRequest includes Slot, Reason, RequestTag, bAllowOverwrite. FSaveGameDirectorLoadRequest includes Slot, reason/tag, and MapPolicy; V1 rejects map mismatch unless current map policy is satisfied, and does not initiate travel.
FSaveGameDirectorSlotIdentifier (header Types/SaveGameDirectorSlotIdentifier.h) is exact slot name plus nonnegative user index. Names must be nonempty, no more than 128 characters, and contain no control characters.
FSaveGameDirectorOperationResult contains ID/type, Severity, Status, user/developer text, warnings, timing, and Actor/contributor counts. SuccessWithWarnings is successful but has warnings. FSaveGameDirectorOperationHandle identifies accepted work; invalid handles indicate no accepted operation.
Actor component
Section titled “Actor component”Header Components/SaveGameDirectorComponent.h; type USaveGameDirectorComponent. Attach it to opt in an Actor. It controls participation, manual/autosave inclusion, restore permission, transforms, supported properties/components, explicit paths, capture mode, restore/destruction policy, and detailed diagnostics. RefreshDirectorRegistration() re-evaluates eligibility after runtime configuration changes. Persistent ID is component-managed. Blueprint hooks OnSaveGameDirectorPreCapture, OnSaveGameDirectorPostCapture, OnSaveGameDirectorPreRestore, OnSaveGameDirectorPostRestore are extension/notification points, not general UObject serialization.
Contributors
Section titled “Contributors”Headers Contributors/SaveGameDirectorContributor.h, Contributors/SaveGameDirectorContributorRegistry.h. Implement contributor/factory interfaces and register a module-lifetime factory with UE::SaveGameDirector::Contributors::RegisterFactory; unregister before module unload. The registry is non-owning; each subsystem owns one contributor per Game Instance. See the real-interface Contributor Guide. Callbacks are game-thread-only and exchange opaque byte arrays and FText errors.
Serialization and container
Section titled “Serialization and container”Serialization/SaveGameDirectorDocumentSerializer.h offers UE::SaveGameDirector::Document::SerializeToBytes(Document, OutBytes, OutError) and DeserializeFromBytes(Bytes, OutDocument, OutError). They return bool and developer-facing errors; deserialize resets output on failure; serializer does not mutate its input.
SaveGame/SaveGameDirectorSaveGame.h defines USaveGameDirectorSaveGame, the Unreal USaveGame wrapper. Blueprint can query IsValidMemoryData and GetDataSize; pass the wrapper back to memory load instead of editing bytes.