# Description of Changes - Fixed an Unreal SDK cache bug with overlapping subscriptions on the same table called out in [Discord](<https://discordapp.com/channels/1037340874172014652/1507200761900171405>) from @defohost - Merged repeated transaction table updates by table name while preserving all row-set payloads - Fixes unique-index `Find(...)` returning empty while `Iter()` still sees the updated row - Aligned Unreal transaction update handling with the other SDKs - Applies one accumulated per-table update per transaction instead of multiple partial passes # API and ABI breaking changes - No intended API or ABI breaking changes to released Unreal SDK behavior # Expected complexity level and risk 2 - Small transaction update normalization change, risk is preserving row multiplicity for overlapping subscriptions # Testing What I've done so far: - [x] Added and ran a throwaway Unreal repro for overlapping identical subscriptions on one table - [x] Ran the full `sdk-unreal-test-harness` - [x] Tested Unreal Blackholio
SpacetimeDB Unreal SDK
This folder contains the Unreal Engine plugin that allows games to talk to a SpacetimeDB server. The design mirrors the official Rust SDK and borrows ideas from the C# SDK so that projects can share a common workflow across languages.
Overview
The plugin exposes a high level API for establishing connections, invoking reducers and keeping a synchronized cache of database tables. Communication happens over WebSockets using the BSATN binary format. Most of the message and type headers are generated by the SpacetimeDB CLI so that Unreal games can send and receive the same structures as other SDKs.
Feature Highlights
- Connect to a SpacetimeDB server and authenticate with identity tokens
- Call reducers and receive their results via Blueprint exposed delegates
- Subscribe to queries and maintain a local table cache updated by server diffs
- Serialize common Unreal types to BSATN, including arrays
- Auto-generated table types keep the API in sync with your database
- Pure C++ implementation with Blueprint wrappers for easy gameplay scripting
Directory Layout
crates/sdk-unreal/
├── DEVELOP.md # Notes on integrating the plugin into a project
├── SpacetimeDbSdk/ # The Unreal plugin sources
│ ├── Resources/ # Plugin icons and metadata
│ └── Source/
│ └── SpacetimeDbSdk/
│ ├── Public/ # Headers used by gameplay code
│ │ ├── BSATN/ # BSATN serializer
│ │ ├── Connection/ # Connection and subscription classes
│ │ ├── DBCache/ # Client side table cache utilities
│ │ ├── Tables/ # Base class for generated table wrappers
│ │ ├── Types/ # Generated message and type headers
│ │ └── tests/ # Unit test helpers for BSATN
│ ├── Private/ # Implementation files
│ └── SpacetimeDbSdk.Build.cs
See the README files in each subfolder for more details on the available classes and helpers.
Getting Started
- Copy
SpacetimeDbSdkinto your project'sPluginsdirectory or use theAdditionalPluginDirectoriesoption described inDEVELOP.md. - Regenerate the headers under
Public/Typesby running the SpacetimeDB CLI against your module schema. - Include
SpacetimeDbSdkin your game's build files and start a connection usingUDbConnectionBuilder.
With the connection established you can call reducers, subscribe to queries and drive gameplay logic using incoming table data.