SpacetimeDB.ClientSDK
2.12.0
Prefix Reserved
dotnet add package SpacetimeDB.ClientSDK --version 2.12.0
NuGet\Install-Package SpacetimeDB.ClientSDK -Version 2.12.0
<PackageReference Include="SpacetimeDB.ClientSDK" Version="2.12.0" />
<PackageVersion Include="SpacetimeDB.ClientSDK" Version="2.12.0" />
<PackageReference Include="SpacetimeDB.ClientSDK" />
paket add SpacetimeDB.ClientSDK --version 2.12.0
#r "nuget: SpacetimeDB.ClientSDK, 2.12.0"
#:package SpacetimeDB.ClientSDK@2.12.0
#addin nuget:?package=SpacetimeDB.ClientSDK&version=2.12.0
#tool nuget:?package=SpacetimeDB.ClientSDK&version=2.12.0
SpacetimeDB C# SDK
Overview
This repository contains the C#, Unity and Godot client SDKs for SpacetimeDB. These SDKs contain all the tools you need to build native clients for SpacetimeDB modules using C#.
Documentation
Unity
The Unity SDK uses the same code as the C# SDK. You can find the documentation for the C# SDK in the C# SDK Reference. For a guided tutorial, see the C# SDK Quickstart.
There is also a comprehensive Unity tutorial/demo available:
- Unity Tutorial Doc
- Unity Demo Repo
Godot
The Godot SDK uses the same code as the C# SDK. You can find the documentation for the C# SDK in the C# SDK Reference. For a guided tutorial, see the C# SDK Quickstart.
There is also a comprehensive Godot tutorial/demo available:
- Godot Tutorial Doc
- Godot Demo Repo
Internal developer documentation
See DEVELOP.md.
Automatic reconnect
C#, Unity, and Godot clients can opt in with .WithAutomaticReconnect() on the connection builder, optionally passing AutomaticReconnectOptions with MinDelay and MaxDelay to tune the backoff. The SDK recovers lost connections, retains cached rows and subscription handles, and replays subscriptions in one batch. Keep calling FrameTick() during outages; Unity's SpacetimeDBNetworkManager does this automatically. Register subscriptions and row callbacks once, in OnConnect or after Build(). OnConnect runs only on the first successful connection; .OnAutomaticReconnect((conn, identity, token) => ...) runs after each successful recovery, before subscription replay. Subscription OnApplied runs again once the cache is reconciled.
For expiring credentials, supply the initial token with .WithToken(initialToken) and add .WithTokenProvider(() => RefreshTokenAsync()). The provider obtains a token for the same identity before a reconnect when needed. If you persist tokens, save them from both OnConnect and OnAutomaticReconnect. Initial connection failures do not retry, and Disconnect() stops recovery. Handle Status.UnknownResult for pending reducer calls whose outcome was lost; the SDK does not repeat them.
See the C# SDK Reference for retry callbacks, token refresh, and subscription behavior, or the reconnect test application for runnable scenarios.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- SpacetimeDB.BSATN.Runtime (>= 2.12.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.12.0 | 608 | 10/13/2026 |
| 2.11.0 | 174 | 10/7/2026 |
| 2.10.2 | 1,599 | 9/29/2026 |
| 2.10.1 | 2,065 | 9/15/2026 |
| 2.10.0 | 1,161 | 9/4/2026 |
| 2.9.0 | 820 | 9/1/2026 |
| 2.8.3 | 1,095 | 8/25/2026 |
| 2.8.2 | 747 | 8/18/2026 |
| 2.8.1 | 1,193 | 8/12/2026 |
| 2.8.0 | 1,308 | 8/5/2026 |
| 2.7.1 | 183 | 7/30/2026 |
| 2.7.0 | 1,262 | 7/22/2026 |
| 2.6.1 | 1,732 | 7/1/2026 |
| 2.6.0 | 3,332 | 6/16/2026 |
| 2.5.0 | 550 | 6/11/2026 |
| 2.4.1 | 225 | 6/5/2026 |
| 2.4.0 | 163 | 6/3/2026 |
| 2.3.0 | 1,402 | 5/27/2026 |
| 2.2.0 | 2,421 | 5/1/2026 |
| 2.1.0 | 1,656 | 3/24/2026 |